Skip to content

Instantly share code, notes, and snippets.

View mattheworres's full-sized avatar

Matthew Orres mattheworres

View GitHub Profile
@mattheworres
mattheworres / CycleThruWindowsOfSameProcess.ahk
Created March 6, 2024 18:51
AutoHotKey v2 Script to cycle through all windows of the currently focused process
; 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) {