开发者

AutoHotKey: Send a button when another is held down, and after released

in AutoHotKey I want to write a script that will press a button once when the right mouse b开发者_开发问答utton 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 return statement to end it:

Numpad0::
Send {d}
return

Numpad0 Up::
Send {u}
return

You can also just declare each hotkey on one line without a return if you're not trying to do too much:

Numpad0:: Send {d}
Numpad0 Up:: Send {u}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜