AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is there a way to create a contextual menu?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
pkutter



Joined: 18 Mar 2009
Posts: 17
Location: Minnesota, USA

PostPosted: Mon May 11, 2009 3:48 pm    Post subject: Is there a way to create a contextual menu? Reply with quote

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
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5044
Location: the tunnel(?=light)

PostPosted: Mon May 11, 2009 4:09 pm    Post subject: Reply with quote

I can't tell for certain but this old thread might be of some help.
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
Drugwash



Joined: 07 Sep 2008
Posts: 921
Location: Ploiesti, RO

PostPosted: Mon May 11, 2009 4:09 pm    Post subject: Reply with quote

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! Laughing
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Solar



Joined: 03 May 2009
Posts: 345
Location: OH, USA

PostPosted: Mon May 11, 2009 5:56 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
pkutter



Joined: 18 Mar 2009
Posts: 17
Location: Minnesota, USA

PostPosted: Mon May 11, 2009 8:41 pm    Post subject: Reply with quote

Thanks for all of the replies. Ah, the difference between searching for context and contextual... Embarassed I suppose I should have tried that.
Thanks,
Pete
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group