Weird bug that i have never seen before

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bassemand
Posts: 1
Joined: 10 Jan 2021, 05:23

Weird bug that i have never seen before

Post by bassemand » 06 Mar 2021, 07:12

I did some research but could not find any topic on this so here it is.

I'm trying to do PixelSearch but the function call takes abnormally long. As you can see in the attached picture, the methode takes 71 seconds to produce an output.

code:

Code: Select all

2::
PixelSearch, px, py, 321, 401, 0x43C4FE, 10, Fast 
if ErrorLevel = 0
{
	msgbox found
}
else
{
	msgbox notfound
}
return
i should point out that everything else works fine, assignments, loops, if's, Mouseclick, Imagesearch.

i have tried the basic stuff: restart and reinstall.
Should be mentioned i'm running it on a virtual machine (Windows 10 x64) but i've never had this problem before on another virtual machine.

Don't know what is causing this, some help would be appriciated :)
Attachments
pixelsearch image.PNG
Speed of pixelsearch
pixelsearch image.PNG (4.35 KiB) Viewed 109 times
User avatar
mikeyww
Posts: 27072
Joined: 09 Sep 2014, 18:38

Re: Weird bug that i have never seen before

Post by mikeyww » 06 Mar 2021, 09:32

You have the wrong syntax. See PixelSearch.

PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID [, Variation, Mode]

Since you are searching a range, you would need to specify both coordinates for the search, even if you are examining only a single pixel.
Post Reply

Return to “Ask for Help (v1)”