在 autohotkey 中,我试图做到这一点,以便当我按下鼠标左键 3 次并延迟+/- 10 毫秒它变成音量静音
LButton::
if (?)
{
Send, Volume_Mute
}
else
{
Send, LButton
}
Return
Use A_TickCount
读取当前时间(以毫秒为单位),然后计算单击之间的延迟。看日期和时间 https://autohotkey.com/docs/Variables.htm#date
ms := A_TickCount
N := 3 ; number of clicks
T := 500 ; max delay between clicks, ms
clicks := 0
~lbutton::
msx := A_TickCount ; get current time
d := msx - ms ; get time past
ms := msx ; remember current time
if (d < T)
clicks += 1
else
clicks := 1
if (clicks >= N)
{
; tooltip %N%-click detected
send {Volume_Mute}
clicks := 0
}
return
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)