Check if a window has a empty title and a certain ahk_class name?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Gary-Atlan82
Posts: 71
Joined: 07 Mar 2023, 05:20

Check if a window has a empty title and a certain ahk_class name?

Post by Gary-Atlan82 » 19 Mar 2023, 10:05

I am dealing with an application that has many panels, all of its panels (not including its main window) share the same ahk_class name, this includes the temporary menu bar panels

After some investigation. I have learnt that the temporary menu bar panels don't have a window title but all the panels have a window title:
For example Menubar > Edit Panel :

Code: Select all

;ahk_class 742DEA58-ED6B-4402-BC11-20DFC6D08040-6571DDC4-B3AA-45e4-9D35-57C0C1E90AD5
;ahk_exe CLIPStudioPaint.exe
And a panel called Layers, belonging to the application:

Code: Select all

; Layer
; ahk_class 742DEA58-ED6B-4402-BC11-20DFC6D08040-6571DDC4-B3AA-45e4-9D35-57C0C1E90AD5
; ahk_exe CLIPStudioPaint.exe
I want to only target the menu bar, with something like:

Code: Select all

Space::
WinWaitActive, ahk_class 742DEA58-ED6B-4402-BC11-20DFC6D08040-6571DDC4-B3AA-45e4-9D35-57C0C1E90AD5
MsgBox, Found
Regarding the above code, the message box will trigger if focus is also given to one of the panels, or if a panel was active at the time of triggering hotkey.

I would like it to only trigger if a menu bar window is found, is this possible?

Thanks.

Return to “Ask for Help (v1)”