Page 1 of 1

Simple Autohotkey script doesn't work in XYplorer only [Solved]

Posted: 04 Sep 2023 00:32
by xy123
Found this Autohotkey script to switch to previous active window.
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
Anyone have idea why it doesn't work? Is XY different kind of window?

Re: Simple Autohotkey script doesn't work in XYplorer only

Posted: 04 Sep 2023 01:20
by highend
Exclude ThunderRT6Main as well. Apart from that, the only thing it does is switching between the two last active windows. There is alt+tab to do that...

Re: Simple Autohotkey script doesn't work in XYplorer only [Solved]

Posted: 04 Sep 2023 01:36
by xy123
Thank you, it works now. :tup:

I am aware of alt+tab, but I don't like UI flashing when I press it.