crashburn Posted June 29, 2009 Posted June 29, 2009 (edited) a little help pls. am making a short script here in gui with buttons, button terminate the looping condition. there are probably 2 loops in 1 function. and another loop in another function, this triggered from the first 2 loops. my question is how to exit loop or interreupt loops when i pressed the designated button? is this the ryt code for that? ;event occured $MSG = GUIGetMsg() if that is, where should i insert that code if the code is like this? 1. if i want to exit "do loop" and i want to go to the main loop 2. or i want to go back to "func 1() while 1 loop" from func 2() func 1() ;do gui here ;show gui while 1 ;<<<< here? if ok <> 1 then do ;<<<< here also? ... until exitbyuser else func 2() endif wend endfunc func 2() while 1 ;<<<< and here also? ... wend endfunc its working if i insert $MSG = GUIGetMsg() in all of the existing loop, but sometimes it takes time to press or it dosn't exit at all. is there any other way i can exit loop or 2 loops in one call $MSG = GUIGetMsg()? Edited June 29, 2009 by crashburn
Bert Posted June 29, 2009 Posted June 29, 2009 (edited) You could do a "Do....until"http://www.autoitscript.com/autoit3/docs/keywords/Do.htm Edited June 29, 2009 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/
crashburn Posted June 29, 2009 Author Posted June 29, 2009 o i get the idea.... why i dindnt think of that.. may be you are ryt. i'll try it now. hope this work. tnx.
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