Sign in to follow this  
Followers 0
runswit2guns

AutoIt window spy and PixelGetColor differing?

6 posts in this topic

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.

[center]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.[/center]

Share this post


Link to post
Share on other sites

im sorry, my Opt('PixelCoordMode')? how do i set/check that. i know the coord mode from the autoinfo tool is RGB?

Share this post


Link to post
Share on other sites

"Window Spy" and problems with colors ? Hmm, I wonder if...

Is the color supposed to be yellow or cyan ?

Share this post


Link to post
Share on other sites

im sorry, not sure what you mean by that

Share this post


Link to post
Share on other sites

I think hes trying to ask you if the colour your trying to get is yellow or cyan.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

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