uber125 Posted January 23, 2007 Share Posted January 23, 2007 I have a scrips that does a search. some times the search fails. Is there a way to say; CODE If @error Then run check again EndIf Thus creating a loop, that will allow the search to be preformed until the desired object is found? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 23, 2007 Developers Share Posted January 23, 2007 I have a scrips that does a search. some times the search fails. Is there a way to say;CODEIf @error Then run check againEndIfThus creating a loop, that will allow the search to be preformed until the desired object is found?Do run check again Until not @error 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. Link to comment Share on other sites More sharing options...
uber125 Posted January 23, 2007 Author Share Posted January 23, 2007 (edited) Do run check again Until not @errorOk, it works if I maximise the window after lodes.However, I'm trying to get it to just log in once it recognizes a certain color pixel.Hence the loop.CODERun ("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.hotmail.com/")WinWaitActive("Sign In - Microsoft Internet Explorer")Sleep (300)WinMove("Sign In - Microsoft Internet Explorer", "", 0, 0, 1000, 900)$coord = PixelSearch(152, 497, 152, 497, 0xFF6002, 1)If Not @error Then $checksum = PixelChecksum(152, 497, 152, 497)EndIfIf @error Then Do $coord = PixelSearch(152, 497, 152, 497, 0xFF6002, 1) Until not @errorEndIfWhile $checksum = PixelChecksum(152, 497, 152, 497) Sleep(200)WEndSend ("user@hotmail.com")Send("{TAB}")Send ("password")Send("{ENTER}")Any Ideas? Edited January 23, 2007 by uber125 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 23, 2007 Moderators Share Posted January 23, 2007 Why not just use the _IE.au3 functions? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
uber125 Posted January 23, 2007 Author Share Posted January 23, 2007 Why not just use the _IE.au3 functions?because that would make sense... :"> lol thanks I didn't see them in there. 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