Skip to content

Instantly share code, notes, and snippets.

@codethereforam
Last active May 18, 2023 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codethereforam/b8556c6e091ea298f6ad87475168a4ed to your computer and use it in GitHub Desktop.
Save codethereforam/b8556c6e091ea298f6ad87475168a4ed to your computer and use it in GitHub Desktop.
Switch Between Windows Of The Same Program@www.autohotkey.com
!`::
WinGetClass, OldClass, A
WinGet, ActiveProcessName, ProcessName, A
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName%
IF WinClassCount = 1
Return
loop, 2 {
WinSet, Bottom,, A
WinActivate, ahk_exe %ActiveProcessName%
WinGetClass, NewClass, A
if (OldClass <> "CabinetWClass" or NewClass = "CabinetWClass")
break
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment