Sign in to follow this  
Followers 0
brawling83

Recognising colour after using pixelgetcolor

3 posts in this topic

Hey guys,

Once I have used the pixelgetcolor function to get a particular pixel color, how do I then script this in to make it useful.

For instance, if I do this:

$colour1 = PixelGetColor ( 875 , 140 )

to get a pixel colour, is it then possible for me to do something like this:

If $colour1 = red, then do this, if $colour1 = not red, then doing that.

Hope that makes sense!

Cheers

Share this post


Link to post
Share on other sites



$RED = 0xff0000

$BLUE = 0x0000ff

$GREEN = 0x00ff00

$result = PixelGetColor(1,1)

If $result = $RED Then MsgBox(0,"","Pixel at 1,1 is red")

Share this post


Link to post
Share on other sites

hehe..

just embarrassed myself at the simplicity of it. thanks for the help mate.

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