Determining an app's context menu command ids

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
Indrego
Posts: 1
Joined: Sun Jun 26, 2016 5:47 am

Determining an app's context menu command ids

Post by Indrego » Sun Jun 26, 2016 6:01 am

I'm attempting to use my remote with Leawo bluray player but most of the functions seem to be within context menus and do not have hot keys assigned to them. I'm having a hard time figuring out how to simulate these commands from within eventghost. I imagine it will be via a SendMessage action, however I have no idea how to find what value to send. I did a bit of research and winspector seems to be the tool of choice but I can't find which window/subprocess I need to look at as none of them seem to send any WM_COMMAND messages. Can someone familiar with these types of commands explain how to go about finding out the command to send (maybe winspector isn't the right tool)?

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Determining an app's context menu command ids

Post by krambriw » Sun Jun 26, 2016 7:21 am

This is such a generic and also interesting question but not only relevant to EG, you might have better chances getting answers at http://stackoverflow.com/

User avatar
kgschlosser
Site Admin
Posts: 4878
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Determining an app's context menu command ids

Post by kgschlosser » Mon Jun 27, 2016 5:28 am

what you could do is try the eventghost find window action.

you might be able to locate the different items you are looking for using that and i am not sure if you can actually find a specific button (for some reason i think you can) and then find it bringing that button into focus. and then just simulate the keypress for enter so "click" the button so to speak.

i have not actually tested to see if that would work so i am going to go and do it now so i know for my own use and for others as well.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4878
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Determining an app's context menu command ids

Post by kgschlosser » Mon Jun 27, 2016 5:36 am

it works for selecting a single button or item in a window, i was able to check and uncheck a box that way but using the emulated keystroke for space


so i would imagine it will work for pressing a specific button also.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4878
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Determining an app's context menu command ids

Post by kgschlosser » Sat Jul 02, 2016 10:50 am

i found a utility for you. that will give you all the information you could want.

you have to download the windows SDK v8.1

if you navigate to the install location usually at

C:\Program Files (x86)\Windows Kits\8.1\bin\x64

there are 2 programs. one is called inspect and the other is called accevent

i think the accevent is the one that will give you the information you need.
If you like the work I have been doing then feel free to Image

Post Reply