Skip to content

Instantly share code, notes, and snippets.

@SidharthArya
Created February 7, 2023 19:53
Show Gist options
  • Save SidharthArya/6531492722259a7891b0582c565bc606 to your computer and use it in GitHub Desktop.
Save SidharthArya/6531492722259a7891b0582c565bc606 to your computer and use it in GitHub Desktop.
Autohotkey Command+` for windows
#`:: ; Next Window
WinGetClass, CurrentActive, A
WinGet, ActiveProcess, ProcessName, A
WinGet, Instances, Count, ahk_exe %ActiveProcess%
; MsgBox, %ActiveProcess% %Instances%
If Instances > 1
WinSet, Bottom,, A
WinActivate, ahk_exe %ActiveProcess%
return
#+`:: ; Next Window
WinGetClass, CurrentActive, A
WinGet, ActiveProcess, ProcessName, A
WinGet, Instances, Count, ahk_exe %ActiveProcess%
; MsgBox, %ActiveProcess% %Instances%
If Instances > 1
WinActivateBottom, ahk_exe %ActiveProcess%
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment