It works in all windows except when XYplorer window is active - nothing happens, no switch just focus lost.
Code: Select all
Capslock::
winNumber = 0
WinGet, win, List
Loop, %win% {
WinGetTitle, ttitle, % winTitle := "ahk_id " win%A_Index% ; Window title
WinGet, proc, ProcessName, %winTitle% ; Window process
WinGetClass, class, %winTitle% ; Window class
winNumber += !(class ~= "i)Toolbar|#32770") && ttitle > ""
&& (ttitle != "Program Manager" || proc != "Explorer.exe")
} Until (winNumber = 2)
WinActivate, %winTitle%
Return
XYplorer Beta Club