F
F
fuitov2021-05-15 09:36:27
autohotkey
fuitov, 2021-05-15 09:36:27

I can't write AHK, what's wrong?

The essence of the program: The
E key should be held for 10 seconds, then it stays in afk, about 5 seconds, the key is released and pressed again, and so on in a circle until you stop
$LCtrl::
Loop
{
Send {e down}
Sleep 10000 ; 10000 milliseconds = 10 seconds
Send {e up}

return
}
I wrote like this, I press the left Ctrl and the E key is pressed, then released, and I need to press Cntrl again how to automate this so that Ctrl turns the script on / off?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
fuitov, 2021-05-15
@fuitov

What needs to be replaced?

V
Vehs, 2021-06-21
@Vehs

That's right. You pressed Ctrl and the loop started. The cycle will end in 10 seconds, because it has a return, i.e. end of the script. Put return after the closing curly brace.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question