IDoNotKnowIt Posted September 2, 2007 Share Posted September 2, 2007 (edited) Do consecutive PixelSearch() functions overwrite "@error?" For example If PixelSearch №1 is succesful and givies @error a value of "1," will an unsuccesful PixelSearch №2 overwrite the value of @error? If yes, how can I get arround this, as I want to use it as a contition it loop (while) funciton. Edited September 2, 2007 by IDoNotKnowIt Link to comment Share on other sites More sharing options...
Nahuel Posted September 2, 2007 Share Posted September 2, 2007 Well.. yes, it does. Take a look at this example I made: While 1 Sleep(500);This is just to give you some time. $coord = PixelSearch( 0, 0, @DesktopWidth, @DesktopHeight, 0xFF0000) If Not @error Then MsgBox(0, "Color red was found at:", $coord[0] & "," & $coord[1]) EndIf WEnd This will search the entire screen over and over to find color red. When it does, it tells you the coordinates of the pixel. Notice how it works using @error. Link to comment Share on other sites More sharing options...
IDoNotKnowIt Posted September 2, 2007 Author Share Posted September 2, 2007 (edited) I ment "... to use it as a condition in ..." Edited September 2, 2007 by IDoNotKnowIt Link to comment Share on other sites More sharing options...
weaponx Posted September 2, 2007 Share Posted September 2, 2007 Just store it in a temp variable: PixelSearch... $ERROR1 = @ERROR PixelSearch $ERROR2 = @ERROR 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