BobDole909 Posted February 21, 2006 Share Posted February 21, 2006 I looked in the helpfile, but I didn't really understand it. This is part of my script I want to loop:Func Bot() WinWaitActive("Project1") Sleep(100) MouseClick("left", 219, 501, 1) Sleep(300) Send("+{BACKSPACE 8}") Sleep(500) Send("99999999") Sleep(300) MouseClick("left", 269, 497, 1) Sleep(500) MouseClick("left", 535, 356, 1) Sleep(5000) MouseClick("left", 516, 498, 1) Sleep(500) MouseClick("left", 314, 213, 1) Sleep(20000) MouseClick("left", 333, 278, 1) Sleep(100)EndFunc()Once it's done with that, how do you loop it? Thanks in advance. Link to comment Share on other sites More sharing options...
jefhal Posted February 21, 2006 Share Posted February 21, 2006 (edited) Check out While WEnd in the help files. Usually looks like: While something is true, do these things. If something happens, exit. Otherwise, keep doing these things... Examples in help file. Edited February 21, 2006 by jefhal ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
TheCuz Posted February 21, 2006 Share Posted February 21, 2006 Look for "While" in the help file, that should get you started. Also, you don't need to create a function for it to be able to loop. Check back with your new code and we'll go from there. [font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font] Link to comment Share on other sites More sharing options...
BobDole909 Posted February 21, 2006 Author Share Posted February 21, 2006 Yeah, I know I don't need a function, but that was PART of my script. Anyways, thanks for the help! Link to comment Share on other sites More sharing options...
GaryFrost Posted February 21, 2006 Share Posted February 21, 2006 example: HotKeySet("{ESC}","_Exit") While 1 Bot() Wend Func Bot() WinWaitActive("Project1") Sleep(100) MouseClick("left", 219, 501, 1) Sleep(300) Send("+{BACKSPACE 8}") Sleep(500) Send("99999999") Sleep(300) MouseClick("left", 269, 497, 1) Sleep(500) MouseClick("left", 535, 356, 1) Sleep(5000) MouseClick("left", 516, 498, 1) Sleep(500) MouseClick("left", 314, 213, 1) Sleep(20000) MouseClick("left", 333, 278, 1) Sleep(100) EndFunc Func _Exit() Exit EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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