Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines, -1
#MaxThreadsPerHotkey 2
~space::
Toggle := !Toggle
while Toggle {
ImageSearch, X, Y, 1243, 873, 1305, 936, *160 HandderHinderung.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 7
Sleep, 30
Send, {Shift Up}
}
}
return
~t::
Toggle1 := !Toggle1
while Toggle1 {
ImageSearch, X, Y, 1243, 873, 1305, 936, *160 HandderHinderung.bmp
if !ErrorLevel {
Send, {Shift Down}
Send, 7
Sleep, 30
Send, {Shift Up}
}
}
return