PixelSearch Hang Up -- Resolved using Fast

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

PixelSearch Hang Up -- Resolved using Fast

24 Feb 2018, 22:51

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
This code resulted in my script hanging and never presenting a MsgBox nor clicking anywhere. The script could only be exited through task manager.

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.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Raymondbit, songdg and 396 guests