Guest tso_xaser Posted March 16, 2005 Share Posted March 16, 2005 Hi everyone I need some help getting this script to loop... I have read the help file i cant work out what to put to get this script to loop i want it to continue until i tell it to stop. Here is the script ========================= MouseMove(392, 13) MouseClick("left") Send ("{ENTER}") Sleep(5000) Send ("{ENTER}") Sleep(10000) MouseMove(1264, 974) Sleep(5000) MouseClick("left") Sleep(5000) Send ("{ENTER}") Sleep(5000) Send ("{ENTER}") Sleep(480000) ========================= it works so far but i need it to loop back to the start after the sleep(480000) Please help Thanks Xaser Link to comment Share on other sites More sharing options...
drak Posted March 16, 2005 Share Posted March 16, 2005 check out this from the helpfile:While...WEnd --------------------------------------------------------------------------------Loop based on an expression.While <expression> statements ...WEnd Parametersexpression If the expression is true the following statements up to the WEnd statement are executed. This loop continues until the expression is false. RemarksWhile...WEnd statements may be nested.The expression is tested before the loop is executed so the loop will be executed zero or more times.To create an infinite loop, you can use a non-zero number as the expression. RelatedContinueLoop, Do...Until, ExitLoop Example$i = 0While $i <= 10 MsgBox(0, "Value of $i is:", $i) $i = $i + 1WEnd Link to comment Share on other sites More sharing options...
steveR Posted March 16, 2005 Share Posted March 16, 2005 (edited) while 1; means to do this loop while 1 is true, which is forever _doStuff(); calls your function sleep(480000); sleeps for8 minutes WEnd; do the loop again Func _doStuff() MouseMove(392, 13) MouseClick("left") Send ("{ENTER}") Sleep(5000) Send ("{ENTER}") Sleep(10000) MouseMove(1264, 974) Sleep(5000) MouseClick("left") Sleep(5000) Send ("{ENTER}") Sleep(5000) Send ("{ENTER}") EndFunc Edit: oops, you beat me to it, Edited March 16, 2005 by steveR AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. 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