satanikut Posted September 20, 2010 Share Posted September 20, 2010 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 Link to comment Share on other sites More sharing options...
Bert Posted September 20, 2010 Share Posted September 20, 2010 Look at the command AutoItSetOption specially the setting in that command: "PixelCoordMode" The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
satanikut Posted September 20, 2010 Author Share Posted September 20, 2010 Look at the command AutoItSetOptionspecially 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 Link to comment Share on other sites More sharing options...
satanikut Posted September 21, 2010 Author Share Posted September 21, 2010 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... Link to comment Share on other sites More sharing options...
seandisanti Posted September 21, 2010 Share Posted September 21, 2010 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 Link to comment Share on other sites More sharing options...
satanikut Posted September 21, 2010 Author Share Posted September 21, 2010 You are right, it returns the correct color Link to comment Share on other sites More sharing options...
seandisanti Posted September 21, 2010 Share Posted September 21, 2010 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now