Sign in to follow this  
Followers 0
satanikut

PixelGetColor newb question (not in FAQ)

7 posts in this topic

I'm new in AutoIt therefore this is for sure an easy question:

I cannot give Autoit the relative coordinates of my window because it

refers always to the absolute ones. For example:

AutoItSetOption("PixelCoordMode",0) ;relative coords to the defined window
WinActivate("DoubleRainbow Mozilla Firefox")
$register=PixelGetColor(616,556)
Exit $register

...doesn't return the relative 616,556 pixel color of the browser's window "DoubleRainbow", but

the p. color of the window that is in the coords 616,556 of the desktop.

Help a newb please

Share this post


Link to post
Share on other sites



Look at the command AutoItSetOption

specially the setting in that command: "PixelCoordMode"

I tried PixelCoordMode 0, 1 and 2 but autoit always return the same color even if

it's changed, I'm blocked here ;)

ps. It's a flash application in a Firefox window

Share this post


Link to post
Share on other sites

Ok it's not a problem of absolute/relative coords, but the point is that PixelGetColor

return always the same color in a flash window...

Share this post


Link to post
Share on other sites

Ok it's not a problem of absolute/relative coords, but the point is that PixelGetColor

return always the same color in a flash window...

no it doesn't, see for yourself

While 1
    Sleep(20)
    $pos = MouseGetPos()
    ToolTip(PixelGetColor($pos[0]+1,$pos[1]+1),$pos[0]+10,$pos[1]+10)
WEnd

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

You are right, it returns the correct color ;)

Share this post


Link to post
Share on other sites

You are right, it returns the correct color ;)

you can add the coords to that tooltip too, so you know what reference you need to give it to see the color

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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