Jump to content

Pixel finding with tolerance


 Share

Recommended Posts

hi, I want to find I pixel on my desktop, I have the Color Values in RGB, but the Pixel Color can be a bit brighter or darker, so how do i implement a pixel finding routine using tolerance ? doesnt have to be fast, 1-2 seconds is ok.

thx

Link to comment
Share on other sites

$pixel = 11141192 ;Replace with color you want to find
$sv = 0 ;Set Shade-Varience, 0 = exact match only 


$xy = PixelSearch(0,0,@DesktopWidth,@DesktopHeight,$pixel, $sv)

If @error Then MsgBox(4096,"@Error ","Could not find Color", 4)

MouseMove($xy[0],$xy[1], 30)
MsgBox(0, "Found", "Found first instance of color at:"&@CRLF&"X: "&$xy[0]&"      Y: "&$xy[1])

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

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