Anyone know what's causing this? I assume its something to do with SendMode or maybe Thread interrupts, but I'm new to AHK and am not sure how to best fix it. I've attached my script below.
Code: Select all
;DIABLO III AUTO CAST FOR STRAFE DH
;- - - Setup - - -
#SingleInstance Force
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode,3
keyList := []
keyList.insert(["Numpad1",6000,0]) ;object = [key, interval(ms), nextInterval(ignore)]
keyList.insert(["Numpad2",5000,0])
keyList.insert(["Numpad3",20000,0])
keyList.insert(["Numpad4",27000,0])
toggle := false
WinActivate,Diablo III
return
Numpad9::
ifWinNotActive,Diablo III
return
toggle := !toggle
if (toggle) {
Send {RButton down}
SetTimer,Auto,10
} else {
Send {RButton up}
SetTimer,Auto,Off
}
return
Auto:
ifWinNotActive,Diablo III
return
loop % keyList.MaxIndex() {
if (a_tickcount > keyList[a_index][3]) {
keyList[a_index][3] := a_tickcount + keyList[a_index][2] - 10
key := keyList[a_index][1]
Send {%key%}
}
}
return
Esc::
toggle := false
Send {RButton up}
SetTimer,Auto,Off
ExitApp
return