Created
March 6, 2024 18:51
-
-
Save mattheworres/e6a98b00f5a93a6bf3514a872b0d1ed0 to your computer and use it in GitHub Desktop.
AutoHotKey v2 Script to cycle through all windows of the currently focused process
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
; Define a hotkey (Windows key + backtick) | |
#`:: | |
; Get the process ID (PID) of the active window | |
WinGet, activePID, PID, A | |
; Enumerate all windows with the same process ID | |
WinGet, windows, List, ahk_pid %activePID% | |
; If there are at least two windows, switch focus to the second one | |
if (windows > 1) { | |
WinActivate, ahk_id %windows2% | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment