Jump to content
Sign in to follow this  
jimmer

Pixel Color Under Mouse

Recommended Posts

jimmer

hello, I have the color the of the pixel

the color is:

Hex: 0x525552 Dec: 5395794

now, to my understanding, you are suppose to pick one of them, correct?

I do not have an idea of what to do with those numbers?

this is all I know to my knowledge

MouseClick("left", x, y, #, speed)

I would like to use the hex or dec color instead of the x and y

-thanks

Share this post


Link to post
Share on other sites
pcdestroyer

hello, I have the color the of the pixel

the color is:

Hex: 0x525552 Dec: 5395794

now, to my understanding, you are suppose to pick one of them, correct?

I do not have an idea of what to do with those numbers?

this is all I know to my knowledge

MouseClick("left", x, y, #, speed)

I would like to use the hex or dec color instead of the x and y

-thanks

<{POST_SNAPBACK}>

so u want the mouse to click where the pixel color is ? if that's what u want then go to the help file and read about PixelSearch

Share this post


Link to post
Share on other sites
jimmer

; Find a pure red pixel in the range 0,0-20,300
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf

Alright, I've searched under PixelSearch, and it will search the pixel for me, and give me a msgbox, that's the last thing I need.

OK... so this is the normal mouse clicker? Where would I insert the color values?

MouseClick("left", x, y, #, speed)

Share this post


Link to post
Share on other sites
pcdestroyer

$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
MouseClick("left", $coord[0],$coord[1], 1, 1)
endif

;$coord[0] is X and $coord[1] is Y

Edited by pcdestroyer

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  

×