Apparently its Game Security Software is blocking everything AutoHotKey does to prevent people from automating their gameplay.
I thought it would hopelessly block any virtual keystrokes, but when I assign keys to my Xbutton1 and Xbutton2 via my Logitech Mouse Macro software, it works fine.
So here I am, looking for suggestions to bypass this behavior. The classic recommedations in this scenario didn't work, namely compiling the script (.exe) and changing the SendMode to Input with keyhold down times.
This is what I am trying to use to prevent Carpal Tunnel Syndrome while playing:
Code: Select all
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
$Enter::
Suspend
SendInput {Enter down}
Sleep 25
SendInput {Enter up}
return
$F12::
Reload
return
$*LShift::
$*q::
$*v::
$*w::
$*e::
$*r::
$*f::
$*d::
$*1::
$*2::
hk := substr(a_thishotkey, 3)
if hk not in %hks%
{
hks .= hks ? "," hk : hk
settimer label, 10
}
return
$LShift up::
$q up::
$w up::
$e up::
$r up::
$f up::
$d up::
$1 up::
$2 up::
hk := substr(a_thishotkey, 2, strlen(a_thishotkey) - 4)
hks := RegExReplace(hks, "(,)\b" hk "\b,|,{0,1}\b" hk "\b,{0,1}", "$1")
if !hks
settimer label, off
return
label:
loop, parse, hks, `,
{
if !getkeystate(A_LoopField, "p") {
hks := RegExReplace(hks, "(,)\b" A_LoopField "\b,|,{0,1}\b" A_LoopField "\b,{0,1}", "$1")
continue
}
sendInput % "{blind}{" A_LoopField " down}"
Sleep 35
sendInput % "{blind}{" A_LoopField " up}"
}
return
May look fancy but all it does really, is to repeatedly self-send the keys chosen.