How to get the menu message code in qt5 program?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ZeronoFreya
Posts: 16
Joined: 31 Jan 2015, 09:28

How to get the menu message code in qt5 program?

12 Jun 2021, 18:36

Program is pureref
www.pureref.com

I tried to use Winspector Spy, but nothing

send method is also invalid
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: How to get the menu message code in qt5 program?

14 Jun 2021, 06:03

what does "get the menu message code" mean?
if u want to show the right-click menu, it looks like its just a window thats hidden/shown, so

Code: Select all

DetectHiddenWindows On
WinShow ahk_class Qt5QWindowPopupDropShadowSaveBits
would reveal it
ZeronoFreya
Posts: 16
Joined: 31 Jan 2015, 09:28

Re: How to get the menu message code in qt5 program?

19 Jun 2021, 08:01

https lexikos.github.io /v2/docs/misc/SendMessage.htm Broken Link for safety
"How do I select a menu item when MenuSelect doesn't work with it?!"

Code: Select all

PostMessage 0x111, 40239, 0, , "New Message"
I want to get wm_command message
image.png
image.png (49.98 KiB) Viewed 319 times
How to operate menu items ?
Autohotkey2
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: How to get the menu message code in qt5 program?

19 Jun 2021, 08:50

I want to get wm_command message
why? what do u think/expect sending a WM_COMMAND is gonna help u with?
whats written in the docs may be true(although it doesnt have to be) of native windows apps, written standard old school win32 fashion. what u have here is not a standard win32 app. if the devs didnt bother implementing windows message support(which they obviously havent as indicated by the clear lack of any relevant messages being captured), then theres nothing u can do using Send-/PostMessage()
How to operate menu items ?
  • if the app is active, send the appropriate shortcut key combination
  • if it isnt active and yet u still want to control it programmatically without activating it, u dont have many options:
    • ask the devs to implement windows message support(unlikely that theyll bother since the app is clearly meant to be cross-platform, so implementing something for windows exclusively might as well be considered a waste of time as it wont be applicable to the other 2 platforms)
    • prod MSAA/UIA for default actions u can trigger(although its very unlikely this has been implemented either - see point above)
    • reverse the app, find out what functions are being called after clicking a menu item, program an injectable dll hooking those functions

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Giresharu, supplementfacts and 135 guests