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 |
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you test it with File Explorer windows? It seems to focus some hidden explorer.exe windows (maybe the desktop?) when I want to cycle thorugh all explorer windows.