Key hold does not work
Posted: 15 Nov 2022, 18:21
Hello. I have a problem and I can't do it on my own. The task is to hold the desired button for a certain time.
This method doesn't work. Only a single press occurs. The Sleep command pauses before an employee press. I tried a bunch of everything and even:
Index = 30 is a few clicks (30) but it doesn't help either. Here, in general, the computer gave an error (blue screen). Is this functionality even possible? it's very easy to do it through keyboard macros but all I found are paid ones like Keyran or BotMek
[Mod edit: Placed the code box tags around the code.]
Code: Select all
j::
Send {k down} ; Press key "1".
Sleep 100 ; Keep it pressed for 100 milliseconds.
Send {k up} ; Let go.
Code: Select all
j::
loop
{
send L
if A_Index = 30
break
}
return
[Mod edit: Placed the code box tags around the code.]