Jump to content

Recommended Posts

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

Link to post
Share on other sites

$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.

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...