Sign in to follow this  
Followers 0
-TS-

arrays and stuff

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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

Share this post


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.

Share this post


Link to post
Share on other sites

ook thx

Share this post


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
Sign in to follow this  
Followers 0