Jump to content
Sign in to follow this  
AzKay

PixelSearch.

Recommended Posts

AzKay

HotKeySet("^{F1}", "_PixelSearch")

While 1
    Sleep(100)
WEnd

Func _PixelSearch()
$PixelSearch = PixelSearch(0, 0, 1280, 800, 0xFF0000, 255)
MsgBox(0, "", $PixelSearch[0] & " " & $PixelSearch[1])
EndFunc

It returns, 0 0, shouldnt it be the coordinate of the first red-shaded pixel?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites
xcal

Wouldn't your shade variation of 255 indicate the color could be anything from (rgb) 0, 0, 0 to 255, 255, 255? Making it always pick 0, 0 for the coord found, since the color could be anything.

Edited by xcal

Share this post


Link to post
Share on other sites
AzKay

Well, It should be searching 255 shades of red ( Thats what I thought )


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites
AzKay

Nevermind, Fixed.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites
xcal

Shade Variation: "A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the colour."

Red is made up of 255, 0, 0. So, a variation of 0-255 for each component could be any color - and therefore the first "any" color is returned.

(sorry, posting at the same time)

Edited by xcal

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.