I made a script that works as follows, when I press the "A" key it triggers the "A" key and waits for 10 seconds to send again if the key is kept pressed.
If I press the "B" key it triggers the "B" key and waits for no second to trigger the "B" key again.
Code: Select all
Loop
{
while getKeyState("A", "P")
send {A}{sleep 10000}
while getKeyState("B", "P")
send {B}
}
The problem is that if I hit the "A" key and then hit the "B" key I have to wait for the 10 seconds for it to work.
Is there any way I can interrupt the Sleep of 10 seconds of the "A" key the moment I press the "B" key, to prevent it being sent with the delay due to sleep?