Jump to content
Sign in to follow this  
Jefferds44

PixelGetColor - relative

Recommended Posts

Jefferds44

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

Share this post


Link to post
Share on other sites
Andreik

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.

When the words fail... music speaks

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.