BALA Posted December 13, 2006 Share Posted December 13, 2006 Is it possible to have two While-WEnd loops and if so how? [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
herewasplato Posted December 13, 2006 Share Posted December 13, 2006 (edited) Is it possible to have two While-WEnd loops and if so how?HotKeySet("{F3}", "NextWhile") Global $trigger = 0 While 1 While 1 MsgBox(0, "Press F3", "Inside while loop.") If $trigger = 1 Then $trigger = 0 ExitLoop EndIf WEnd MsgBox(0, "", "Outside while loop.") WEnd Func NextWhile() $trigger = 1 EndFunc ;==>NextWhile Edited December 13, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
BALA Posted December 13, 2006 Author Share Posted December 13, 2006 (edited) well I meant something along the lines of two separate loops. Edited December 13, 2006 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
herewasplato Posted December 13, 2006 Share Posted December 13, 2006 (edited) well I meant something along the lines of two separate loops.HotKeySet("{F3}", "NextWhile") Global $trigger = 0 While 1 MsgBox(0, "Press F3", "First loop.") If $trigger = 1 Then $trigger = 0 ExitLoop EndIf WEnd While 1 MsgBox(0, "", "Final loop.") WEnd Func NextWhile() $trigger = 1 EndFunc ;==>NextWhile...now if you say - I meant at the same time - I'll........... Edit:........gently suggest reading about AdlibEnable Edited December 13, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
BALA Posted December 13, 2006 Author Share Posted December 13, 2006 No this is good [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Gondus Posted December 13, 2006 Share Posted December 13, 2006 You need to end the while after either a specific number of times looped or until the action wanted is done, you can always go back to it later by using another loop While $i <= 10 MsgBox(0, "This will end after the count goes to 10", $i) $i = $i + 1 WEnd While 1 MsgBox(0, "This box will loop!", "This will Loop!") WEnd You can also set it up after a specific action is done, but check your help files for that. -----------Current Programming Language Status:Beginner: J#, Ruby Intermediate: Autoit, Java, C#, C++Advanced: Basic, Visual Basic, Fortran 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