Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

thx that made it stay working :whistle: , 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

Posted

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

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