sandman Posted February 2, 2007 Share Posted February 2, 2007 Okay.. I was about to make a stat calculator script and was in the middle of making the GUI and decided to test it. Everything works fine.. except for two things:It doesn't sleep... at all.It exits the window as soon as it opens it.Here is the code:#include <GUIConstants.au3> $LoaderPopup = GUICreate("",100,100,100,100,$WS_POPUP) $LoaderProg = GUICtrlCreateProgress(25,45,50,5,$PBS_SMOOTH) GUISetState(@SW_SHOW) Sleep(60) GUICtrlSetData($LoaderProg, 100) Sleep(60) Sleep(40) $MainWin = GUICreate("MYKO Character Rating Calculator",500,500) $Title = GUICtrlCreateLabel("Basic Calculator", 25, 5, 50, 10) GUISetState(@SW_SHOW)What am I doing wrong? [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
Valuater Posted February 2, 2007 Share Posted February 2, 2007 Sleep(1000) = sleep 1 second try sleep(2000) or (3000) 8) Link to comment Share on other sites More sharing options...
sandman Posted February 2, 2007 Author Share Posted February 2, 2007 Oh.. hehe. Thanks! [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
sandman Posted February 2, 2007 Author Share Posted February 2, 2007 Okay, that works now.. but as soon as the new main window shows up it stays for about a millisecond and then disappears. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
Edgar Posted February 2, 2007 Share Posted February 2, 2007 [*]It exits the window as soon as it opens it. You should add the "while" loop for the GUI as below. #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend 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