I've been working with PixelSearch lately and I like to use this small script just to see if it is finding / not finding the target color correctly:
This makes the assumption that Notepad is your target window, change as needed:
Code:
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
#p::
WinGetPos, X, Y, Width, Height, Notepad
PixelSearch, Px, Py, X, Y, X+Width, Y+Height, 0x9B8363, 0, Slow
if ErrorLevel
{
MouseMove, X, Y
MsgBox, That color was not found: %x% %y% %width% %height%.
}
else
{
MouseMove, Px, Py
MsgBox, Your color was found at X%Px% Y%Py%.
}
Return
Could do something similar to create msgboxes for PixelGetColor to tell you if it is behaving the way to are looking for.