code example as follows:
Code: Select all
diy_hotkey::
{
If ProcessExist("WindowsTerminal.exe")=0
run windowsTerminal,env ;path setted by user
Else If WinActive("ahk_class CASCADIA_HOSTING_WINDOW_CLASS")
WinHide("ahk_class CASCADIA_HOSTING_WINDOW_CLASS")
else
WinShow("ahk_class CASCADIA_HOSTING_WINDOW_CLASS") ;works well
Winactivate("ahk_class CASCADIA_HOSTING_WINDOW_CLASS") ;fails, TargetError
return
}
Several similar examples just goes failing as above.
I see the changing log "Changed WinActivate to throw TargetError if the window is not found" in a130,
but maybe it's a new bug.