Optimizing PixelGetColor/ImageSearch on Windows 10

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Graesholt
Posts: 25
Joined: 03 Oct 2017, 11:15

Optimizing PixelGetColor/ImageSearch on Windows 10

26 Apr 2018, 01:42

I have a script that needs to perform about a thousand (961, to be exact) PixelGetColors pretty often in order to analyze the minimap of a game.
The problem is that I find this to be a rather slow affair.

I have sone some light research, and discovered that before Windows Aero was introduced (with Windows Vista), PixelGetColor and ImageSearch were able to run much faster (the exact science of why still elludes me).
Windows Aero could be turned off in Windows Vista and 7, but 8 and 10 are stuck with it on. I'm running a Windows 10 system, so I guess that I'm out of luck in that department.

I have performed Oldman's test from this post, and the one thousand PixelGetColors, which takes Oldman 63 MILLISECONDS, take my machine everything from five to twenty seconds.

Is there any way to optimize my system to perform these checks?
Anything I can install og fiddle with in the settings to give them priority?

Is there any way these functions could be optimized themselves?
I'm not assuming to be smarter than anyone, who is obviously on a whole other level if they're developing AutoHotKey, but in this post (scroll down to the "Performance" section) an individual claims that AutoIt does PixelGetColors approximately twice as fast as AutoHotKey, so would that be worth looking into?

Thank you for your time, and my apologies if I'm asking dumb questions.
User avatar
sooyke
Posts: 7
Joined: 21 Apr 2018, 10:23

Re: Optimizing PixelGetColor/ImageSearch on Windows 10

26 Apr 2018, 07:41

You can take a look here for alternatives but they are a lot more complicated :)

https://autohotkey.com/boards/viewtopic.php?f=5&t=47955
Graesholt
Posts: 25
Joined: 03 Oct 2017, 11:15

Re: Optimizing PixelGetColor/ImageSearch on Windows 10

04 May 2018, 01:52

sooyke wrote:You can take a look here for alternatives but they are a lot more complicated :)

https://autohotkey.com/boards/viewtopic.php?f=5&t=47955
Thank you for your reply.
This is indeed faster and WAY too complicated ;P

The obvious question then becomes if faster methods do exist, why haven't/can't the PixelGetColor function be updated to reflect this?

Again, not trying to be a smart-ass, just asking...

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww, RussF and 384 guests