So I'm new to AHK and am hoping someone can help me write what should be a really simple script. The thing is, the game I need it for, SW:TOR, has an ability queue system which doesn't always recognize a key press unless it's held down for a certain period of time. I've found 150 ms to work very well on my mouse, but since my keyboard's software doesn't include macro capabilities I'm left with AHK. Anyway, here's what I want it to do:
When "6" is pressed:
Press left click
Wait 25 ms
Release left click
Wait 25 ms
Press "r"
Wait 150 ms
Release "r"
End macro
In particular, I'm having trouble figuring out how to make AHK press and release a key at different times instead of simply sending the command. Any help would be greatly appreciated!
Request Help Writing Simple Macro
-
- Posts: 22
- Joined: 12 Sep 2017, 03:13
Re: Request Help Writing Simple Macro
HiClaudius wrote:So I'm new to AHK and am hoping someone can help me write what should be a really simple script. The thing is, the game I need it for, SW:TOR, has an ability queue system which doesn't always recognize a key press unless it's held down for a certain period of time. I've found 150 ms to work very well on my mouse, but since my keyboard's software doesn't include macro capabilities I'm left with AHK. Anyway, here's what I want it to do:
When "6" is pressed:
Press left click
Wait 25 ms
Release left click
Wait 25 ms
Press "r"
Wait 150 ms
Release "r"
End macro
In particular, I'm having trouble figuring out how to make AHK press and release a key at different times instead of simply sending the command. Any help would be greatly appreciated!
Code: Select all
6::
send {click down}
sleep 25
send {click up}
sleep 25
send {r down}
sleep 150
send {r up}
return
Re: Request Help Writing Simple Macro
Thank you for the reply, the script works perfectly!
Who is online
Users browsing this forum: No registered users and 91 guests