Jump to content
Sign in to follow this  
runswit2guns

AutoIt window spy and PixelGetColor differing?

Recommended Posts

i have a program which reads a color at a pixel using PixelGetColor. i use it in an if statement

If PixelGetColor(403, 483) = 16777089 Then

when i scroll the mouse over that that spot, the number 16777089 is the decimal value i get of that color. the problem is it never enters the if statement. i inserted the code....

$pixel = PixelGetColor(403, 483);

MsgBox(0, "regv", $pixel);

right above the if statement to check out what is going on and almost each time i run the program, $pixel has a different value, even when AutoIt window spy says otherwise. anyone know why this is happening or what causes it. thanks a lot. I appreciate it. I am using AutoIt v3.

Share this post


Link to post
Share on other sites

i have a program which reads a color at a pixel using PixelGetColor. i use it in an if statement

If PixelGetColor(403, 483) = 16777089 Then

when i scroll the mouse over that that spot, the number 16777089 is the decimal value i get of that color. the problem is it never enters the if statement. i inserted the code....

$pixel = PixelGetColor(403, 483);

MsgBox(0, "regv", $pixel);

right above the if statement to check out what is going on and almost each time i run the program, $pixel has a different value, even when AutoIt window spy says otherwise. anyone know why this is happening or what causes it. thanks a lot. I appreciate it. I am using AutoIt v3.

Make sure your Opt('PixelCoordMode') matches your Coord mode that you are using on the AutoInfo tool.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  

×
×
  • Create New...