rliiack Posted September 25, 2009 Share Posted September 25, 2009 This is my code: #include <GUIConstantsEx.au3> menuCreator() Func menuCreator() Local $slider GUICreate("Smart Icons",200, 500, 100, 100) GUISetBkColor(0x00E0FFFF) $slider = GUICtrlCreateSlider(50, 20, 100, 10) GUICtrlSetLimit($slider,100,0) GUISetState(@SW_SHOW) GUICtrlSetData($slider, 45) EndFunc How come my menu opened for one second then closed? Am I missing some code? Thanks My Projects:Smart Icons Link to comment Share on other sites More sharing options...
Mat Posted September 25, 2009 Share Posted September 25, 2009 You need to include a loop. The problem is that the script finishes and exits just after you create it. #include <GUIConstantsEx.au3> menuCreator() While 1 If GUIGetMsg () = -3 Then ExitLoop WEnd Func menuCreator() Local $slider GUICreate("Smart Icons",200, 500, 100, 100) GUISetBkColor(0x00E0FFFF) $slider = GUICtrlCreateSlider(50, 20, 100, 20) GUICtrlSetLimit($slider,100,0) GUISetState(@SW_SHOW) GUICtrlSetData($slider, 45) EndFunc Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
rliiack Posted September 25, 2009 Author Share Posted September 25, 2009 Thanks, I fixed it. My Projects:Smart Icons 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