Answer the question
In order to leave comments, you need to log in
How to make a keypress within a time range?
I need help writing a script.
I need a key to be pressed within a certain range of time, for example from 15 seconds to 20, etc.
So that the time is chosen randomly.
There is such code:
!1: :
loop
{
SendInput, { E } ;
sleep 17000
}
return
!2: :
pause
Answer the question
In order to leave comments, you need to log in
; рандомизация времени нажатия для сходства с человеком
F1::
Loop
{
Random, rand1, 150, 300 ; переменная со случайным значением от 150 до 300 мс
Random, rand2, 1000, 10000 ; аналогично от 1 до 10 секунд
Send {F5 Down}
sleep, rand1
Send {F5 Up}
sleep, rand2
}
F2::
Exitapp
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question