Sign in to follow this  
Followers 0
Pfaeff

Pixel finding with tolerance

5 posts in this topic

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

Share this post


Link to post
Share on other sites



Pixelsearch(0,0,@DesktopWidth, @DesktopHeight, $Color, $ShadeVar)
I think $ShadeVar can = 1 to 255


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

Share this post


Link to post
Share on other sites

where can I find the documentation of Pixelsearch ? because I dont know how to use it :) I need the coordinates of the first pixel it finds.

thx

Share this post


Link to post
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

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