I'ts why I'm calling for your help. What I want is a "simple" script that allow me to repeat a Key when I just press it twice, and then stop when I press again or when any key is pressed.
In that part of code, it's processing when I press the key once, I did not suceed to make it with double tap.
(Im on azerty KeyBoard)
Code: Select all
$&::
RepeatKey:=! RepeatKey
If RepeatKey=1
SetTimer, SendTheKey, 2400
else
SetTimer, SendTheKey, Off
SendTheKey:
Sendinput &
Return
Solutions I got on the web does not work for me,or I surely missed something. So I tried this (make you laugh) :
Code: Select all
$z::
send z
if repeatkey
repeatkey=0
SetTimer, SendTheKey, Off
return
$q::
send q
if repeatkey
repeatkey=0
SetTimer, SendTheKey, Off
return
$s::
send s
if repeatkey
repeatkey=0
SetTimer, SendTheKey, Off
return
$d::
send d
if repeatkey
repeatkey=0
SetTimer, SendTheKey, Off
return
So, thanks in advance for your help guys !
PS : There is my full code, in case you find errors, others parts are weirds but it's seems to work as I want it to :
Code: Select all
#singleinstance
#MaxThreadsPerHotkey, 2
toggle=0
return
rbutton::
toggle:=!toggle
if toggle=1
click ,right ,down
if toggle=0
click, right, up
return
$&::
RepeatKey:=! RepeatKey
If RepeatKey=1
SetTimer, SendTheKey, 2400
else
SetTimer, SendTheKey, Off
SendTheKey:
Sendinput &
Return
$z::
send z
if repeatkey
repeatkey=0
SetTimer, SendTheKey, Off
return
$q::
send q
if repeatkey
repeatkey=0
SetTimer, SendTheKey, Off
return
$s::
send s
if repeatkey
repeatkey=0
SetTimer, SendTheKey, Off
return
$d::
send d
if repeatkey
repeatkey=0
SetTimer, SendTheKey, Off
return
#If, A_IsPaused
Numpad5::
suspend
pause
return
#If
Numpad5::
suspend
pause
return