ImageSearch high CPU load

Ask gaming related questions (AHK v1.1 and older)
TheLelik
Posts: 1
Joined: 04 Mar 2018, 10:07

ImageSearch high CPU load

04 Mar 2018, 10:14

Hi!
I'm pretty new to AHK scripting.
Do you mind to help me implement some optimization to low my CPU load.

Code: Select all

#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
Process, Priority, , low
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
Loop { 
 
 
	ImageSearch, FoundX, FoundY, 8, 8, 500, 160, %A_WorkingDir%\pic1.bmp
if ErrorLevel = 0
    SoundPlay, %A_ScriptDir%\ringout.wav, wait    
else
	SoundPlay, no.wav  

	ImageSearch, FoundX, FoundY, 8, 8, 500, 160, %A_WorkingDir%\pic2.bmp
if ErrorLevel = 0
    SoundPlay, %A_ScriptDir%\ringout.wav, wait    
else
	SoundPlay, no.wav

	 ImageSearch, FoundX, FoundY, 8, 8, 500, 160, %A_WorkingDir%\pic3.bmp
if ErrorLevel = 0
    SoundPlay, %A_ScriptDir%\ringout.wav, wait    
else
	SoundPlay, no.wav

}

Thanks!

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 74 guests