Skip to content

Commit

Permalink
Cleaned up the code and updated quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
sameerasw committed Apr 23, 2023
1 parent fb6e794 commit b392709
Showing 1 changed file with 42 additions and 73 deletions.
115 changes: 42 additions & 73 deletions MacroNumberKeys.ahk
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
; ______________________launch or switch to ms edge -1______________________
#if !GetKeyState("NumLock", "T")
NumpadEnd::#1

; ______________________launch or switch to file explorer -2______________________
launchOrSwitchfiles()
{
Expand All @@ -24,20 +28,7 @@ Return
NumpadDown::launchOrSwitchfiles()
}

; ______________________launch or switch to ms edge -1______________________
#if !GetKeyState("NumLock", "T")
NumpadEnd::#1

; ______________________launch or switch to telegram -5______________________

#if !GetKeyState("NumLock", "T")
NumpadClear::#5

; ______________________launch or switch to whatsapp uwp beta -6______________________
#if !GetKeyState("NumLock", "T")
NumpadRight::#6

; ______________________launch or switch to nitro sense/ notifications -3______________________
; ______________________launch or switch to nitro mail/ notifications -3______________________
#if !GetKeyState("NumLock", "T")
{
NumpadPgDn::
Expand All @@ -56,6 +47,31 @@ NumpadPgDn::
return
}

; ______________________Switch to discord -4______________________
#if !GetKeyState("NumLock", "T")
NumpadLeft::#4

; ______________________launch or switch to telegram -5______________________

#if !GetKeyState("NumLock", "T")
NumpadClear::#5

; ______________________launch or switch to whatsapp uwp beta -6______________________
#if !GetKeyState("NumLock", "T")
NumpadRight::#6

; ______________________launch or switch to notion -7______________________
#if !GetKeyState("NumLock", "T")
NumpadLeft::#7

; ______________________launch or switch to vscode -8______________________
#if !GetKeyState("NumLock", "T")
NumpadUp::#8

; ______________________launch or switch to intellij -9______________________
#if !GetKeyState("NumLock", "T")
NumpadPgUp::#9

; ______________________Notifications______________________
#if !GetKeyState("NumLock", "T")
{
Expand All @@ -75,45 +91,7 @@ NumpadEnter::
return
}

; ______________________launch or switch to google photos -9______________________
#if !GetKeyState("NumLock", "T")
NumpadPgUp::#9

; ______________________launch or switch to gmail -8______________________
#if !GetKeyState("NumLock", "T")
NumpadUp::#8

; ______________________Switch to vscode -4______________________
#if !GetKeyState("NumLock", "T")
NumpadLeft::#4

; ______________________launch or switch to spotify -7______________________
launchOrSwitchspotify()
{
IfWinExist ahk_exe Spotify.exe
{
IfWinActive ahk_exe Spotify.exe
{
WinMinimize, A
}
Else
{
WinActivateBottom, ahk_exe Spotify.exe
}
}
Else
{
send, #7
}
Return
}

#if !GetKeyState("NumLock", "T")
{
NumpadHome::launchOrSwitchspotify()
}

; ______________________Switch tab -.______________________
; ______________________minimize -______________________
#if !GetKeyState("NumLock", "T")
{
NumpadDiv::
Expand Down Expand Up @@ -190,17 +168,6 @@ Return
NumpadSub::close()
}

; ______________________switch windows -0______________________
#if !GetKeyState("NumLock", "T")
{
NumpadIns::
Send {Alt Down}
Send {Tab}
Keywait, NumpadIns
Send {Alt Up}
return
}

; ______________________Switch tab -.______________________
#if !GetKeyState("NumLock", "T")
{
Expand All @@ -220,6 +187,16 @@ NumpadDel::
return
}

; ______________________switch windows -0______________________
#if !GetKeyState("NumLock", "T")
{
NumpadIns::
Send {Alt Down}
Send {Tab}
Keywait, NumpadIns
Send {Alt Up}
return
}

; ______________________new tab/window -+______________________
fullscrn()
Expand Down Expand Up @@ -328,11 +305,6 @@ Return
#if !GetKeyState("ScrollLock", "T")
SC176::Run, "C:\Program Files\Rainmeter\Rainmeter.exe" !ToggleConfig "Screensaver" "Clock.ini"

; ______________________Screen Off_________________________
#if !GetKeyState("NumLock", "T")
#if GetKeyState("ScrollLock", "T")
SC176 up::SendMessage 0x112, 0xF170, 2, , Program Manager ; Monitor off

; ______________________System Tray______________________
#if !GetKeyState("NumLock", "T")
{
Expand Down Expand Up @@ -383,7 +355,4 @@ PrintScreen::
#if !GetKeyState("NumLock", "T")
{
Pause::Send, +{PrintScreen}
}



}

0 comments on commit b392709

Please sign in to comment.