Jump to content
Sign in to follow this  

PixelGetColor range

Recommended Posts

Hi, little snag.

I am trying to verify if a pixel is red.

What I tried was this:

case (PixelGetColor(80, 553) >= dec("400000") and PixelGetColor(80, 553) <= dec("f20000"))

The problem is, this color registers as true:


which is sort of an amber color.

I see looking att the values that the number IS between those values. The way I got those values is in Photoshop I found red and just moved the curser to a darker red (in the color chooser). Obviously this won't work.

My question is, how do I test to see if a pixel is RED, no matter how dark or light, but RED.

Share this post

Link to post
Share on other sites

I'm sure there is a better way.. but you could try PixelSearching your single pixel for a true red color.. and have a wide shade variation.

PixelSearch ( left, top, right, bottom, color [, shade-variation][, step]] )


left left coordinate of rectangle.

top top coordinate of rectangle.

right right coordinate of rectangle.

bottom bottom coordinate of rectangle.

colour Colour value of pixel to find (in decimal or hex).

shade-variation [optional] 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. Default is 0 (exact match).

step [optional] Instead of searching each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1.

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...