WinWaitActive false positive Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

WinWaitActive false positive

03 Mar 2024, 15:16

The following command triggers on any dialog of the specified class (typical shell dialogs class #32770) belonging to the process with PID %ePID% (confimed as the correct PID) but regardless of its title text, so not only on the "Save HTML Document" dialog but also the "Font" and "Color" dialogs. I've tried all title match modes, but the title text component of the title specification is consistently ignored, even when specified as a RegEx.

Code: Select all

WinWaitActive, ahk_class #32770 ahk_pid %ePID% Save HTML Document
I've worked around it for now by confirming the active window title after each detection before taking any action, but I'm left wondering if I'm doing something wrong. [If there's a chance that this is related to some unusual aspect of the target process, it's Nirsoft's HTMLDocEdit.exe, a useful but flawed tiny Wysiwyg HTML editor].

Thanks.

JB
User avatar
mikeyww
Posts: 27214
Joined: 09 Sep 2014, 18:38

Re: WinWaitActive false positive  Topic is solved

03 Mar 2024, 15:39

Yep, need to read this page:

https://www.autohotkey.com/docs/v1/misc/WinTitle.htm#multi
When using this method, the text of the title (if any is desired) should be listed first, followed by one or more additional criteria. Criteria beyond the first should be separated from the previous with exactly one space or tab (any other spaces or tabs are treated as a literal part of the previous criterion).
JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: WinWaitActive false positive

03 Mar 2024, 16:40

Are you kidding me?! I must have read that page a hundred times over the decades and never noticed that particular caveat. I guess I've rarely needed the title text to identify windows, relying instead on window IDs, PIDs, and classes, but this time around, it became unavoidable.

Thanks, buddy!

JB

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 179 guests