Code: Select all
While GetKeyState("LAlt", "P")
Send {A up}
SetKeyDelay 50
Send {D up}
SetKeyDelay 50
Send {A down}
SetKeyDelay 50
Send {D down}
SetKeyDelay 50
Thanks in advance!
Code: Select all
While GetKeyState("LAlt", "P")
Send {A up}
SetKeyDelay 50
Send {D up}
SetKeyDelay 50
Send {A down}
SetKeyDelay 50
Send {D down}
SetKeyDelay 50
Code: Select all
LAlt::
SetKeyDelay, 50
While GetKeyState(A_ThisHotkey, "P")
Send ad
Return
Code: Select all
LAlt::
SetKeyDelay, 50
While GetKeyState(A_ThisHotkey, "P")
{
Send AD
}
Return
I don't think running the script as an administrator is gonna fix this, since i already tried it. Also, running the game in window mode didn't help fix the issue either.You just need to separate the keypresses into separate up/down events. The simple reason for this is that AHK can press and release a key so quickly that the game will not register it.
A couple side notes:
1. Typically AHK scripts must be run 'as administrator' to interact with games. (Right click on script, run as administrator)
2. AHK has difficulty registering keystrokes in full screen games. You might have to run the game in windowed mode.
this might fix the issue i'm having. But i'll be honest, i don't know how to achieve this. I don't understand how to separate the keypresses into separate up/down events . I tried using up/down for keypresses but it didn't work. Most likely because i didn't use them correctlyYou just need to separate the keypresses into separate up/down events. The simple reason for this is that AHK can press and release a key so quickly that the game will not register it.
Code: Select all
LAlt::
SetKeyDelay, 50, 50
While GetKeyState(A_ThisHotkey, "P")
Send ad
Return
Users browsing this forum: BernardDwess, yuu453 and 92 guests