Tarawa Posted July 5, 2004 Posted July 5, 2004 I'm trying to make a script using a Do, Until loop, however, when ever I try to run the script in AutoIt 3, i get an error saying "'Until' statement with no matching 'Do' statement." However, I do have a Do statement. heres my script: $r = 0; Do Send("!1"); sleep(10000); Send("!5"); Sleep(10000); Send("!2"); Sleep(10000); Send("!5"); Sleep(10000); $r = $r + 1; if $r = 15 then Send("h"); sleep (1200000); Send("h"); Until $r = 1000 Any ideas? Thanks
SlimShady Posted July 5, 2004 Posted July 5, 2004 Tarawa said: I'm trying to make a script using a Do, Until loop, however, when ever I try to run the script in AutoIt 3, i get an error saying "'Until' statement with no matching 'Do' statement." However, I do have a Do statement. heres my script: $r = 0; Do Send("!1"); sleep(10000); Send("!5"); Sleep(10000); Send("!2"); Sleep(10000); Send("!5"); Sleep(10000); $r = $r + 1; if $r = 15 then Send("h"); sleep (1200000); Send("h"); Until $r = 1000 Any ideas? ThanksYou forgot "EndIf".
Developers Jos Posted July 5, 2004 Developers Posted July 5, 2004 This is were Tidy.exe come in handy: Tidy output: $R = 0; Do Send("!1"); Sleep(10000); Send("!5"); Sleep(10000); Send("!2"); Sleep(10000); Send("!5"); Sleep(10000); $R = $R + 1; If $R = 15 Then Send("h"); Sleep(1200000); Send("h"); ;### Tidy Error: Level error -> Until is closing previous if Until $R = 1000 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Tarawa Posted July 5, 2004 Author Posted July 5, 2004 not sure what you mean with tidy.exe, but the "EndIf" fixed it.. thanks
Developers Jos Posted July 5, 2004 Developers Posted July 5, 2004 (edited) Tarawa said: not sure what you mean with tidy.exe, but the "EndIf" fixed it.. thanksTidy is a utility that Tidy's the script source by indenting the source properly and also checks for errors like you had...Look for tidy in the scrips and scraps forum.... Its also part of the Scite Editor install set. Edited July 5, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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