AutoHotkey Community

It is currently May 27th, 2012, 2:34 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: February 12th, 2010, 9:33 pm 
Offline

Joined: July 22nd, 2008, 1:49 pm
Posts: 151
Hi again.

I'm trying to make a menu that will pop up whenever the user right-clicks anywhere in the GUI, i've figured out from the helpfile that i should use GUIcontextmenu, but i havn't been able to figure out which syntax to use to actually link a menu being showed when guicontextmenu is launched.

Anyone able to point me in the right direction?

Thanks again.[/code]


Last edited by totalmig on February 12th, 2010, 11:28 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 12th, 2010, 10:18 pm 
Offline

Joined: February 6th, 2010, 5:17 pm
Posts: 57
Code:
;~ Create the menu:
Menu, menu1, Add, Thing 1, label1
Menu, menu1, Add, Thing 2, label2
Gui, Show, w400 h400
Return

;~ Show the menu when you right-click:
GuiContextMenu:
Menu, menu1, Show, %A_GuiX%, %A_GuiY%
Return

;~ Do something when you click the menu:
label1:
MsgBox, You clicked 1.
Return

label2:
MsgBox, You clicked 2.
Return

GuiClose:
ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 12th, 2010, 11:28 pm 
Offline

Joined: July 22nd, 2008, 1:49 pm
Posts: 151
Thanks alot :)


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: Alpha Bravo, LazyMan, rbrtryn and 21 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