Topher Posted May 31, 2012 Share Posted May 31, 2012 Neither the Close button or closing the gui works can't see what I am missing. $StatID = GUICreate("High Scores", 220, 495-30) ... ; wait until window is closed $close = GUICtrlCreateButton("Close", 220-100, 431, 90, 30) Do $msg = GUIGetMsg() If $msg = $close Then ExitLoop Sleep(20) Until $msg = $GUI_EVENT_CLOSE GUIDelete($StatID) OnExit() Routine is at line 828 in whole codeReflex.au3 [left][hr] $mood = "whimsy" $mode = "confused" $randomChaos = True Do Something() Until $Tired[/left][left]Reflex (Arcade game)[/left][left]IX (Board game)[/left][left]The Word Game (Word game)[/left][left]Plastic Sliding Squares Puzzle (Puzzle)[/left] Link to comment Share on other sites More sharing options...
johnynardi Posted May 31, 2012 Share Posted May 31, 2012 Maybe this will be good for you ? $StatID = GUICreate("High Scores", 220, 495-30) GUISetState(@SW_SHOW) ; wait until window is closed $close = GUICtrlCreateButton("Close", 220-100, 431, 90, 30) while 1 $msg = GUIGetMsg() If $msg = $close Then ExitLoop Sleep(20) WEnd GUIDelete($StatID) OnExit() Link to comment Share on other sites More sharing options...
Topher Posted May 31, 2012 Author Share Posted May 31, 2012 Maybe this will be good for you ? $StatID = GUICreate("High Scores", 220, 495-30) GUISetState(@SW_SHOW) ; wait until window is closed $close = GUICtrlCreateButton("Close", 220-100, 431, 90, 30) while 1 $msg = GUIGetMsg() If $msg = $close Then ExitLoop Sleep(20) WEnd GUIDelete($StatID) OnExit() Sorry, failed to include that when I clipped the middle. I'm remembering now that I had a problem with StringFormat in this routine earlier. I'm going to write my own stringformat routine and see if that fixes things. [left][hr] $mood = "whimsy" $mode = "confused" $randomChaos = True Do Something() Until $Tired[/left][left]Reflex (Arcade game)[/left][left]IX (Board game)[/left][left]The Word Game (Word game)[/left][left]Plastic Sliding Squares Puzzle (Puzzle)[/left] Link to comment Share on other sites More sharing options...
Topher Posted May 31, 2012 Author Share Posted May 31, 2012 Nope, that didn't magically fix things this time. I'm stumped. [left][hr] $mood = "whimsy" $mode = "confused" $randomChaos = True Do Something() Until $Tired[/left][left]Reflex (Arcade game)[/left][left]IX (Board game)[/left][left]The Word Game (Word game)[/left][left]Plastic Sliding Squares Puzzle (Puzzle)[/left] Link to comment Share on other sites More sharing options...
johnynardi Posted May 31, 2012 Share Posted May 31, 2012 Me to .. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted June 1, 2012 Share Posted June 1, 2012 Because you activated OnEvent earlier and you can't mix OnEvent and MessageLoop. Opt("GUIOnEventMode",1) Either turn it temporarily off in HighScore() or stick to the same mode throughout your script. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Topher Posted June 1, 2012 Author Share Posted June 1, 2012 Thank you. I'm not use to using OnEvent (someone suggested it as a work around on a different problem.) Easy fix, again thanks - this was driving me nuts. [left][hr] $mood = "whimsy" $mode = "confused" $randomChaos = True Do Something() Until $Tired[/left][left]Reflex (Arcade game)[/left][left]IX (Board game)[/left][left]The Word Game (Word game)[/left][left]Plastic Sliding Squares Puzzle (Puzzle)[/left] 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