AnttiV wrote:
Try using "Send" instead of "SendPlay" and put these two lines at the top of the script:
Code:
SendMode Input
SetKeyDelay, 50, 50
If that doesn't work, fiddle with the two numbers (try anything from 10 to 500, with 500 being really extreme). If nothing seems to work, try removing the SendMode command.
Games are very tricky sometimes. The *ONLY* way I've been able to make AHK work with H.A.W.X, is to make sure I *don't* have sendmode set anywhere, and be sure setkeydelay is set at 50, 50. On one other game, I must be sure sendmode is set to Input (nothing else works) and that keydelay is over 75, but under 150.
Yes, pain in the ass to find that one out.
Like this?
Code:
SendMode input
SetKeyDelay, 1000, 1000
capslock::
send {t down}
sleep 20
send {t up}
sleep 20
send {t down}
sleep 20
send {t up}
sleep 2000
even like that, I have only a 20ms delay between each key, almost unnoticable. Am I going about this wrong?
Edit: think I got it working, removed the first line. Thank you!!!!
Edit: Wondering if anyone knows, why does the script cancel out when you press any other key? I have to keep tapping Capslock to keep the script going, if I just hold down caps lock to keep it going then it will be canceled out by another keystroke.