【问题标题】:Push and Hold Functionality for Autohotkey自动热键的按住功能
【发布时间】:2019-01-16 05:57:26
【问题描述】:

我有一个接受双击输入的自动热键没问题。我还想添加一个“Push and Hold”功能,但我无法完全解决不断尝试它的问题。

这是 TL;DR

我想单击鼠标中键发送一个 •

我想双击鼠标中键发送一个▪

我想要按住鼠标中键发送一个◦

API 链接:https://autohotkey.com/docs/commands/KeyWait.htm

MButton::
KeyWait, MButton
KeyWait, MButton, D T.3
if(!ErrorLevel){
Send ▪ 
}
else{
if(!ErrorLevel){
KeyWait, MButton, D T.2
Send ◦
}
else{
Send •
return
}
}

return

上面有什么问题?

【问题讨论】:

    标签: input autohotkey


    【解决方案1】:
    MButton::
        KeyWait, MButton, T0.3
        If !(ErrorLevel)
        { 
            Sleep, 300
            If (A_PriorHotKey = "MButton Up") ; double click
                Send ▪
            else                              ; single click
                Send •
        }
        else                                  ; push-and-hold
            Send ◦
    return
    
    MButton Up:: return
    

    【讨论】:

    • 我考虑了一段时间没有成功。您巧妙地使用 MButton Up 热键就是解决方案。
    • 我从来没有考虑过 MButton Up,如果没有你的例子我也不会。谢谢你。这将使我能够极大地扩展我的热键,从而提高我的工作效率。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-30
    • 1970-01-01
    • 2012-11-16
    • 1970-01-01
    相关资源
    最近更新 更多