SweatyOgre Posted May 25, 2004 Share Posted May 25, 2004 The way the help file puts it, and the example it uses, make me wonder how I can script this action I want to. The helpfile says: For <variable> = <start> To <stop> [Step <stepval>] statements ... Next Example For $i = 5 to 1 Step -1 MsgBox(0, "Count down!", $i) Next MsgBox(0,"", "Blast Off!")I'd like to set it to loop my action a certain amount of times, would this be possible without the variable? Just set it to, say, For = <start> To <stop> statements ... Next ? Link to comment Share on other sites More sharing options...
brett Posted May 25, 2004 Share Posted May 25, 2004 for statements always confuse me, but u can always use a while...they seem easier. I'm not sure of a way to do without variables on the 'for' loop , but why not use them? -Brett Link to comment Share on other sites More sharing options...
SweatyOgre Posted May 25, 2004 Author Share Posted May 25, 2004 It'd just seem easier to me to not use them for this action. Here's the code I want it to repeat, I want it to do it 300 times. Maybe you could help me? MouseMove(100, 1, 0) $x = MouseGetCursor() Do $x = MouseGetCursor() Sleep(500) Until $x = 2 MouseClick ( "left", 594, 499 ) Sleep (100) MouseClick ( "left", 648, 531 ) Sleep (100) MouseClick ( "left", 503, 527 ) MouseMove(100, 1, 0) $x = MouseGetCursor() Do $x = MouseGetCursor() Sleep(500) Until $x = 2 MouseClick ( "left", 422, 450 ) Link to comment Share on other sites More sharing options...
SweatyOgre Posted May 25, 2004 Author Share Posted May 25, 2004 Thanks to both of you. Link to comment Share on other sites More sharing options...
Nutster Posted June 4, 2004 Share Posted June 4, 2004 The variable keeps track of which time the loop you are in. You can read it to find out where you are. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... 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