Code: Select all
XButton2::
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
Click
Sleep 100
PixelSearch, OutputX, OutputY, 104, 352, 330, 999, 0x097138,,RGB
If ErrorLevel
{
MsgBox Ahhhh
return
}
OutputX+=5
OutputY+=5
MouseClick Left, %OutputX%, %OutputY%
return
I am not sure where exactly I went wrong.
I was able to resolve it by using Fast RGB as the last parameter. I recently upgraded to 1.1.28.00, and had previously been on 1.1.26.01 or something a little old. I don't recall ever having a problem with PixelSearch that required Fast mode.
For the sake of a quick test, I searched the area from 1,1 to 2,2. I had also been trying Window instead of Screen in both CoordModes initially and the problem was present there. (I didn't change coordinates as my window was positioned at 0,0 anyhow.)
If this sounds more like a Bug Report, I'm welcome to having the topic moved there. Unfortunately, because of personal information I cannot provide a screenshot (well, recording would be best as the first Click brings up a change in the UI) at this time.