Learn AutoHotKey by stealing my scripts
I&#x27;d like to ask the AHK programmers here if anyone can figure out how to do the macOS&#x27;s CMD+` and CMD+SHIFT+` to alternate between windows of the same App in Windows while ignoring any minimized window.<p>I managed to coerce chat GPT to do a working version for the `Last Window`, but it simply cannot do a working forward version.<p>```<p><pre><code>    !+`:: ; Last window
    WinGet, ActiveProcessName, ProcessName, A
    WinGet, windows, List, ahk_exe �tiveProcessName%
    Loop, % windows
    {
        thisID := windows%A_Index%
        WinGet, thisWindowState, MinMax, ahk_id %thisID%
        if (thisWindowState = -1)
            continue ; Skip if window is minimized
        lastWindow := thisID
    }
    if (lastWindow)
    {
        WinActivate, ahk_id %lastWindow%
    }
    return 
</code></pre>
```