-TS- Posted January 13, 2004 Posted January 13, 2004 having a little truble with arrays $var = PixelSearch(226, 591, 379, 591, 263172) sleep(500) Select Case $var[0] = 260;error on this var array i have tryed many dif ways to use this but as soon as it cant find the color i get an error i know it would be something simple but im not seeing... THX
scriptkitty Posted January 13, 2004 Posted January 13, 2004 I like the function: $var = PixelSearch(226, 591, 379, 591, 263172) sleep(500) if IsArray ( $var ) =1 then; array=true Select Case $var[0] = 260;error on this var array ... rest of code endif AutoIt3, the MACGYVER Pocket Knife for computers.
-TS- Posted January 14, 2004 Author Posted January 14, 2004 thx that made it stay working , how do i check the @error? ive tryed checking the error thing but i must of script it wrong err soemthing THX larry and scriptkitty
scriptkitty Posted January 14, 2004 Posted January 14, 2004 $var = PixelSearch(226, 591, 379, 591, 263172) if @error =1 Then MsgBox(1,"Error","Pixel Not found") or $var = PixelSearch(226, 591, 379, 591, 263172) $error=@error sleep(500) if $error<>1 then; array=true Select Case $var[0] = 260;error on this var array ... rest of code endif Just make sure to check errors the next line, or the next command might reset the @error flag. AutoIt3, the MACGYVER Pocket Knife for computers.
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