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

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
xy123
Posts: 215
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

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

Post 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?
Last edited by xy123 on 04 Sep 2023 01:34, edited 1 time in total.

highend
Posts: 14926
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post 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...
One of my scripts helped you out? Please donate via Paypal

xy123
Posts: 215
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

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

Post 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.

Post Reply