Jump to content

Recommended Posts

Posted (edited)

Hi guys,

I'm pretty new to AutoIt. I'd like to get a pixel color from a window but PixelGetColor always returns an absolute value.

Here's what I did:

  • I used the Finder Tool to select the pixel I wanted to know the color.
  • I then entered the info for that pixel in my script.

Here's my code:

WinActivate ("Neptune Dropper")
$var = PixelGetColor (214, 592, "Neptune Dropper")
dbg("The value of PixelGetColor is " & $var)
dbg("The value of PixelGetColor is " & Hex($var, 6))

I have only been getting absolute results. I have read the documentation and it states that by default the coordinates for PixelGetColor are relative. Can anyone help me figure this out?

Secondly, I was wondering if the relative coordinates were "Window" coordinates or "Client" coordinates?

Thanks,

Jeff

Edited by Jefferds44
Posted

Hi guys,

I'm pretty new to AutoIt. I'd like to get a pixel color from a window but PixelGetColor always returns an absolute value.

Here's what I did:

  • I used the Finder Tool to select the pixel I wanted to know the color.
  • I then entered the info for that pixel in my script.

Here's my code:

WinActivate ("Neptune Dropper")
$var = PixelGetColor (214, 592, "Neptune Dropper")
dbg("The value of PixelGetColor is " & $var)
dbg("The value of PixelGetColor is " & Hex($var, 6))

I have only been getting absolute results. I have read the documentation and it states that by default the coordinates for PixelGetColor are relative. Can anyone help me figure this out?

Secondly, I was wondering if the relative coordinates were "Window" coordinates or "Client" coordinates?

Thanks,

Jeff

Read in help file about PixelCoordMode.

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
×
×
  • Create New...