Jump to content
Sign in to follow this  
redhairedfoo

Help with Looping PixelSearch Until...

Recommended Posts

redhairedfoo

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
Uriziel01

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.