winactivate with DetectHiddenWindows(true)

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
erann
Posts: 3
Joined: 28 Apr 2024, 01:34

winactivate with DetectHiddenWindows(true)

29 Apr 2024, 01:29

In v1, in order to find and activate a window on a different virtual desktop, I switched on DetectHiddenWindows. Is there a way to do the same with V2?

The following script does not activate a window. Only when DetectHiddenWindows is set to 0 or line commented out the window is properly activated.

Code: Select all

#Requires AutoHotkey v2+
DetectHiddenWindows(true)
WinActivate SomeWindowTitle

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
User avatar
mikeyww
Posts: 27146
Joined: 09 Sep 2014, 18:38

Re: winactivate with DetectHiddenWindows(true)

29 Apr 2024, 06:02

If that works, use it. The windowing functions act upon the topmost matching window (unless noted otherwise). A hidden window might be found in your case. Being more specific with your WinTitle might also prove successful.
erann
Posts: 3
Joined: 28 Apr 2024, 01:34

Re: winactivate with DetectHiddenWindows(true)

29 Apr 2024, 06:58

Specifying the hwnd of the window indeed solved the issue. Thanks!

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: alawsareps, Draken and 33 guests