AutoHotkey Community

It is currently May 26th, 2012, 7:41 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: May 11th, 2009, 4:48 pm 
Offline

Joined: March 18th, 2009, 3:06 pm
Posts: 17
Location: Minnesota, USA
I've looked through the help file and searched the forum, but can't find a way to create a contextual menu. It looks like just about all of the other gui functions are available. Is it called something else?

I have a list view that I would like to be able to right click on and execute one of several run commands based on the list view item that I right clicked on.

I'm currently using a list view and buttons at the bottom to accomplish the same thing, but I may be adding many more buttons, and I think it would be cleaner with a contextual menu.

Thanks,
Pete


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2009, 5:09 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
I can't tell for certain but this old thread might be of some help.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2009, 5:09 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
See here, please.
This one can also be used when ~RButton is set as hotkey to invoke the menu.
May be others too - check the script showcase.

Perfect timing, sinkfaze! :lol:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2009, 6:56 pm 
Offline

Joined: May 3rd, 2009, 7:16 pm
Posts: 345
Location: OH, USA
Quote:
GuiContextMenu: Launched whenever the user right-clicks anywhere in the window except the title bar and menu bar. It is also launched in response to pressing the Apps key or Shift-F10.


Code:
Menu, Context, Add
Return

GuiContextMenu:
   If A_GuiControl = MyListView ; if the name of the variable assosiated with the Gui control that launched the thread is "MyListView"
      Menu, Context, Show ; show the context menu that should have been created previously (as shown above)
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2009, 9:41 pm 
Offline

Joined: March 18th, 2009, 3:06 pm
Posts: 17
Location: Minnesota, USA
Thanks for all of the replies. Ah, the difference between searching for context and contextual... :oops: I suppose I should have tried that.
Thanks,
Pete


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Azevedo, over21, perlsmith, Yahoo [Bot] and 66 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