eHrgo Posted April 9, 2007 Posted April 9, 2007 Hi all, Thanks for your time: I have just a little question: If I have something like: While 1 $msg=GuiGetmsg() Select Case $msg=$save ;ExitSelect Case $msg=$close Exit 0 Endselect Wend ;My Program.. How can I tell my program to stop the While loop inside the Case $msg=$save function? Go directly to MyProgram .. etc. Thanks a lot Sorry for my Bad English.
eHrgo Posted April 9, 2007 Author Posted April 9, 2007 $i=0 While $i<>1 $msg=GuiGetmsg() Select Case $msg=$save $i=1 Case $msg=$close Exit 0 Endselect Wend ;My Program.. I solved it by doing this, but its a stupid way to do it. Is there any other official way? Sorry for my Bad English.
eHrgo Posted April 9, 2007 Author Posted April 9, 2007 ExitLoop will break out of a While, Do or For loop.In my case, I'm in a Select, so it displays me an error if I use it.Thanks Sorry for my Bad English.
Bert Posted April 9, 2007 Posted April 9, 2007 One thing to remember when coding - You have standards in the code, but there is no "official" way. Coding is a art. (A dark art at that) You can say a coder is a artist. It it works, it isn't stupid. There are more efficient ways of doing things at times, then again not. Po put it another way - "To each his own" the girl said as she kissed the cow.... The Vollatran project My blog: http://www.vollysinterestingshit.com/
Emperor Posted April 9, 2007 Posted April 9, 2007 Local $Var = 0 While True Select Case $Var = 3 ExitLoop Case Else MsgBox(0, "Example", "Looping...") $Var += 1 EndSelect WEnd MsgBox(0, "", "ExitLoop")
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