in AutoHotKey
I want to write a script that will press a button once when the right mouse button is held
and press another once its released.
I tried writing something (I used numpad0 instead of mousebutton)
Numpad0::
Send {d}
Numpad0 Up::
Send {u}
but, it keeps sending du all the time, instead of just d and a final u.
why is that?
If you’re putting your hotkey command on a different line to where the hotkey is declared you need to use a
returnstatement to end it:You can also just declare each hotkey on one line without a
returnif you’re not trying to do too much: