Sign in to follow this  
Followers 0
redhairedfoo

Help with Looping PixelSearch Until...

2 posts in this topic

Hey everyone,

Im trying to Loop PixelSearch, lets say 50 times, or until it finds the pixel i want. When it finds the pixel, i want to click it and exit the loop.

Im having a bit of trouble figuring this one out and would appreciate any help or advice!

thanks,

red

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Something like that?

$i=1
while 1
$pixel=PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )
if @error<>1 then
 MouseClick ( "left" ,$pixel[0], $pixel[1], 1)
Exitloop
endif
if $i>50 then exitloop
$i+=1
wend
Edited by Uriziel01

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