Jump to content

Help with Looping PixelSearch Until...


Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...