Code: Select all
MouseGetPos,,, mp
WinGet, prn, ProcessName, ahk_id %mp%
WinGetTitle, tit, ahk_id %mp%
Code: Select all
MouseGetPos,,, mp
WinGet, prn, ProcessName, ahk_id %mp%
WinGetTitle, tit, ahk_id %mp%
Code: Select all
IfNotWinActive, ahk_class WorkerW
{
; not on the desktop - do something
}
Yes, I need to check whether the mouse cursor is above an open folder (which has a title) or simply above Explorer.exe (which does not have a window title).
I have tried using the command “If Not WinActive, ahk_class WorkerW,” but it does not differentiate between an open folder and the desktop/ taskbar in Windows 10.mshafer1 wrote: ↑06 Aug 2020, 13:07I've found the the ahk class (as in WinGetClass) to be effective.
If desktop is active: this equals "WorkerW", else: it equals "CabinetWClass"
I've used
for something similar before (in my case, I wanted F5 to trigger a code deploy, if the Desktop was the active "window", else pass it through)Code: Select all
IfNotWinActive, ahk_class WorkerW { ; not on the desktop - do something }
Users browsing this forum: kashmirLZ and 208 guests