Select from Right Click Context Menu

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
MusoCity
Posts: 95
Joined: 24 Mar 2018, 20:45

Select from Right Click Context Menu

29 Apr 2022, 03:32

I was using down, right, enter to navigate but the menu changes so I need to right click and select an item.
Using this this to display the id viewtopic.php?f=6&t=31971
This is what I'm using but I must have something wrong ?

Code: Select all

#NoEnv
#SingleInstance 

WinActivate, ahk_class TxForm 
ControlClick , TMixerPanel27, ahk_class TxForm, , , 1 ; Gives the menu
PostMessage, 0x111, 1429,,, A
Say I want to click Solo
Attachments
AHK-Context-Menu.png
AHK-Context-Menu.png (116.49 KiB) Viewed 670 times
User avatar
boiler
Posts: 17387
Joined: 21 Dec 2014, 02:44

Re: Select from Right Click Context Menu

29 Apr 2022, 06:00

You chose the wrong item. Solo would be 1430 on that list. The “Disabled Grayed” item (2nd in the list) is the separator line. Once you realize that, you’ll see how that menu contains 22 items.
MusoCity
Posts: 95
Joined: 24 Mar 2018, 20:45

Re: Select from Right Click Context Menu

29 Apr 2022, 16:46

So if I chose 1429 instead of 1430 that means if would be muting the track but it's not, the click is bringing the menu up but that's it.
Attachments
AHK-Mixer.gif
AHK-Mixer.gif (188.95 KiB) Viewed 593 times
User avatar
boiler
Posts: 17387
Joined: 21 Dec 2014, 02:44

Re: Select from Right Click Context Menu

29 Apr 2022, 17:12

Well, I don't know how the rest of your code works, so maybe you're not applying something right, but I think you can see that 1430 is the number associated with that menu item. You can go down the line and see how each item describes the one on the menu when you include the separator lines.
MusoCity
Posts: 95
Joined: 24 Mar 2018, 20:45

Re: Select from Right Click Context Menu

29 Apr 2022, 17:32

It works if I use the above code with Notepad.
I can't get the actual TButton id with SimpleSpy it gets the TMixerPanel27 frame.
Attachments
AHK-Mixer-Spy.gif
AHK-Mixer-Spy.gif (117.81 KiB) Viewed 577 times
MusoCity
Posts: 95
Joined: 24 Mar 2018, 20:45

Re: Select from Right Click Context Menu

29 Apr 2022, 17:37

This works to open the Save As dialog in Notepad

Code: Select all

#NoEnv
#SingleInstance 

WinActivate, ahk_class Notepad
Send, !f
PostMessage, 0x111, 3,,, A ;WM_COMMAND ;Save As...
User avatar
boiler
Posts: 17387
Joined: 21 Dec 2014, 02:44

Re: Select from Right Click Context Menu

29 Apr 2022, 20:55

MusoCity wrote: I can't get the actual TButton id with SimpleSpy it gets the TMixerPanel27 frame.
There might not be one. Not everything is a named/addressable control.
MusoCity
Posts: 95
Joined: 24 Mar 2018, 20:45

Re: Select from Right Click Context Menu

29 Apr 2022, 23:09

None the less the menu ID's are showing so there must be some way to send the command with
PostMessage, 0x111 as it's a #32768 menu.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], peter_ahk and 247 guests