AutoHotkey Community

It is currently May 27th, 2012, 11:39 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: April 21st, 2010, 4:32 am 
Offline

Joined: September 12th, 2006, 8:38 pm
Posts: 79
I need help selecting a menu item from a right-click menu, aka context menu. I want to make a script that can right-click on 2 different kinds of objects, detect what type of object they are based on the context menu that appears and select an appropriate item from the menu.

Specifically, I need to select either "Properties - Super-module" or "Properties - Module" depending on which one shows up after right-clicking. Of course these 2 items are in different positions and have different short-cut keys, so there is no one-size-fits-all option. :(

I saw commands for working with the menu bar menus, e.g. WinMenuSelectItem, but nothing to work with right-click menu.

Any ideas?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 21st, 2010, 9:01 am 
Offline

Joined: November 9th, 2009, 3:09 pm
Posts: 258
well either you can do a imagesearch or after right clicking send the short keys and wait if not appeared pass another short key something like putting it into if else condition and checking it with winexist or not


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 21st, 2010, 7:24 pm 
Offline

Joined: September 12th, 2006, 8:38 pm
Posts: 79
I used the trial and error approach - try one short-cut key and if the appropriate dialog doesn't pop up, try the other. It's a bit of a kludge and takes a bit longer since I have to wait to see if the Window appears, but it does work.

It's surprising that there isn't anything to work with right-click menus. There is so much other good stuff for working with menus, etc.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: bowen666, MSN [Bot] and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group