Damein Posted October 4, 2010 Share Posted October 4, 2010 I read through the help files.. and the topics posted to me before.. and for some reason I just cannot understand somethings. I can easily do this kind of stuff in AHK, and this language is not the much different. I can't even seem to use the help file examples to create what I want :/ This is my code #include <StaticConstants.au3> #include <GUIConstantsEx.au3> HotKeySet("`", "ShowGUI") While 1 Sleep(10) WEnd Func ShowGUI() GUICreate("Quick Search", 200, 100) $HelpMenu = GUICtrlCreateMenu("Help") $HelpItem = GUICtrlCreateMenuItem("Help file", $HelpMenu) GUISetState(@SW_SHOW) EndFunc GUISetState() While 1 $msg = GUIGetMsg() If $msg = $HelpItem Then MsgBox(0, "Info", "Only a test...") EndIf WEnd So all I am attempting to do is a create a menu that shows a msgbox once I select it. I tried taking snippets from the help file and putting them in but I always get errors that way. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
wakillon Posted October 4, 2010 Share Posted October 4, 2010 you can try like this ! #include <StaticConstants.au3> #include <GUIConstantsEx.au3> HotKeySet("`", "ShowGUI") GUICreate("Quick Search", 200, 100) $HelpMenu = GUICtrlCreateMenu("Help") $HelpItem = GUICtrlCreateMenuItem("Help file", $HelpMenu) While 1 $msg = GUIGetMsg() If $msg = $HelpItem Then MsgBox(0, "Info", "Only a test...") WEnd Func ShowGUI() GUISetState(@SW_SHOW) EndFunc AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
lordicast Posted October 4, 2010 Share Posted October 4, 2010 for toggle #include <StaticConstants.au3> #include <GUIConstantsEx.au3> HotKeySet("`", "ShowGUI") GUICreate("Quick Search", 200, 100) $HelpMenu = GUICtrlCreateMenu("Help") $HelpItem = GUICtrlCreateMenuItem("Help file", $HelpMenu) $state = 1 While 1 $msg = GUIGetMsg() If $msg = $HelpItem Then MsgBox(0, "Info", "Only a test...") if $msg = $GUI_EVENT_CLOSE then Exit WEnd Func ShowGUI() if $state = 1 Then GUISetState(@SW_SHOW) $state = 0 Else GUISetState(@SW_HIDE) $state = 1 EndIf EndFunc [Cheeky]Comment[/Cheeky] 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