Does it work at that point, showing the MsgBox?
Remember that your search occurs only once, so when you press "g", the color would need to exist in the coordinate range that you specified. Is that the case?
Your current script directs the Send command to occur if the color is not found.
All you really need to debug is the following and nothing else.
Code: Select all
g::
PixelSearch, Px, Py, 790, 885, 1080, 920, 0x49423A, 3, Fast
MsgBox, 64, ErrorLevel, %ErrorLevel%
Return
This uses coordinates relative to the active window. If you want absolute coordinates, put CoordMode, Pixel at the top.