Jump to content
Sign in to follow this  
runswit2guns

AutoIt window spy and PixelGetColor differing?

Recommended Posts

runswit2guns

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
SmOke_N

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
runswit2guns

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
Helge

"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
AzKay

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  

×

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.