Last active
July 5, 2024 04:33
-
-
Save rbika/014fb3570beaef195db0bd53fa681037 to your computer and use it in GitHub Desktop.
AutoHotKey script to cycle between windows of the same app
This file contains 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
; Cycle between windows of the same app like in macOS - Alt+backtick. | |
; Source: https://gist.github.com/rbika/014fb3570beaef195db0bd53fa681037 | |
#NoEnv | |
SendMode Input | |
SetWorkingDir %A_ScriptDir% | |
!`:: | |
WinGet, activeProcess, ProcessName, A ; Retrieves the name of the process that owns the active window | |
WinGet, winList, List, ahk_exe %activeProcess% ; Retrieves a pseudo-list of windows belonging to this process | |
WinActivate, % "ahk_id " winList%winList% ; Activates the last window in the stack | |
return | |
; Limitations | |
; • It does not work in Explorer app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment