-
-
Save tonylambiris/d9dab2d144dae4b38f0ae60c364131e7 to your computer and use it in GitHub Desktop.
Switch windows by process name using Alt+` and S
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Based on https://superuser.com/a/768060/542406 | |
!`:: ; Next window | |
WinGet, ActiveProcessName, ProcessName, A | |
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName% | |
IF WinClassCount = 1 | |
Return | |
Else | |
WinSet, Bottom,, A | |
WinActivate, ahk_exe %ActiveProcessName% | |
return | |
!+`:: ; Last window | |
WinGet, ActiveProcessName, ProcessName, A | |
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName% | |
IF WinClassCount = 1 | |
Return | |
Else | |
WinActivateBottom, ahk_exe %ActiveProcessName% | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment