Guest johnq Posted April 21, 2005 Share Posted April 21, 2005 Now I have defined a hotkey and a menu in my autoit3 script, what function to use to bring up the menu upon receiving the hotkey. Link to comment Share on other sites More sharing options...
quick_sliver007 Posted April 22, 2005 Share Posted April 22, 2005 Now I have defined a hotkey and a menu in my autoit3 script, what function to use to bring up the menu upon receiving the hotkey.<{POST_SNAPBACK}>#include <GuiConstants.au3> $Gui = GUICreate("Gui") $menu = GUICtrlCreateMenu("&menu") $Menu_Item = GUICtrlCreateMenuitem("item",$menu) GUISetState() HotKeySet("{ENTER}","_myfunction") While 1 $msg = GUIGetMsg() Select case $msg = -3 Exit EndSelect WEnd Func _myfunction() send("{ALT}"&"m") EndFuncTake note of the "&" before the "m" in the word menu. . Link to comment Share on other sites More sharing options...
Guest johnq Posted April 22, 2005 Share Posted April 22, 2005 Tnanks! But I would change yourFunc _myfunction() send("{ALT}"&"m") EndFunc toFunc _myfunction() WinActivate($Gui) send("{ALT}"&"m") EndFunc Link to comment Share on other sites More sharing options...
quick_sliver007 Posted April 22, 2005 Share Posted April 22, 2005 Tnanks! But I would change your toFunc _myfunction() WinActivate($Gui) send("{ALT}"&"m") EndFunc<{POST_SNAPBACK}>Glad I could help . Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now