Bonestein Posted August 28, 2007 Share Posted August 28, 2007 How do you make a loop inside of a loop? like this <----------------------return to this point and run the loop again $i = 0 Do sleep(6500) send ("1") sleep(4500) send ("5", $i) $i = $i + 1 Until $i = 45 ----------------------------------->send back to the top or line of choice. until I manually close or stop it? Link to comment Share on other sites More sharing options...
weaponx Posted August 28, 2007 Share Posted August 28, 2007 While 1 $i = 0 Do sleep(6500) send ("1") sleep(4500) send ("5", $i) $i = $i + 1 Until $i = 45 WEnd Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 28, 2007 Moderators Share Posted August 28, 2007 I don't know what you mean by "manually"... generally there are conditions that will happen to make you "manually" do it. Global $bBool HotKeySet("{HOME}", "Start_Stop_That_Damn_Loop") While 1 Sleep(1000000) WEnd Func Start_Stop_That_Damn_Loop() $bBool = Not $bBool Local $i While $bBool Sleep(100) Send(1) Send($i);No idea what you are doing with $i in your example, there are only 2 flags, 0 and 1 $i += 1 WEnd EndFuncUsing the Home key, you can start and stop it at your leisure. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Bonestein Posted August 28, 2007 Author Share Posted August 28, 2007 I was just going off of the example in the online documentation http://www.autoitscript.com/autoit3/docs/keywords/Do.htmit put the extra $i in there, so I used it there also. I will take these examples and learn from them, thank you for your assistance. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 28, 2007 Moderators Share Posted August 28, 2007 I was just going off of the example in the online documentation http://www.autoitscript.com/autoit3/docs/keywords/Do.htmit put the extra $i in there, so I used it there also. I will take these examples and learn from them, thank you for your assistance.It put the $i in a MsgBox so you can visually see what Do/Until is doing.... It didn't put it in a Send command that shows in the help file what the parameters are and their limitations/expectations.All I'm saying is read first what you can and can't do with a function, or you'll be asking questions later on it that could have been solved by simply reading the help file on param usage.Good Luck, and you're welcome. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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