Created
September 13, 2019 15:09
-
-
Save snmishra/794c5f41693510c46ba9bedc839696a8 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
Hmm, no. I never used it with Explorer in the last two months. Indeed it doesn't work there. I am open to updating the gist if you find a fix. It's not a problem I'm facing, and I'm not an AHK expert, so I probably won't spend any time fixing it.