mithandir1 Posted June 16, 2008 Share Posted June 16, 2008 (edited) I originally had a pixelsearch that looked for an error message box. This was causing problems when ingame windows were opened. I decide to replace it with a "if winexist" statement. The problem is I don't know how to exit the loop now Here is the original: if WinExists("game")then do sleep(10) ToolTip("Everything OK", 0, 0, "Game Bot", 1) PixelSearch( 420, 420, 438, 438, 15526360, 10 ) $err4 = @error until $err4 < 1 endif controlsend("Disconnected From Server","","","{enter}") call("restart") Here is what I want to do now: if WinExists("game")then do ToolTip("Everything OK", 0, 0, "Game Bot", 1) if WinExists("Disconnected From Server")then controlsend("Disconnected From Server","","","{enter}") WinWaitClose("Disconnected From Server") endif Until ???? call("restart") How can I make it exit the second if statement? Do I need to use something besides a "do until" with the new code? This has me stumped. I really appreciate any help. EDIT: Apologies for the double post it was an accident and I don't seem to have a delete option Edited June 16, 2008 by mithandir1 Link to comment Share on other sites More sharing options...
Kerros Posted June 16, 2008 Share Posted June 16, 2008 place an Exitloop in before your endif Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. 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