Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Autohotkey 自动热键鼠标向下继续按一个键,直到鼠标向上_Autohotkey_Mousedown - Fatal编程技术网

Autohotkey 自动热键鼠标向下继续按一个键,直到鼠标向上

Autohotkey 自动热键鼠标向下继续按一个键,直到鼠标向上,autohotkey,mousedown,Autohotkey,Mousedown,我正在尝试制作一个脚本,使我能够继续按某个键,例如1,当我按住鼠标左键超过0.5秒时,该脚本将继续,直到释放鼠标左键 希望有人能帮我。你可以试试这样的。我使用鼠标中键进行测试 我注释掉了特定于应用程序的行 SetTitleMatchMode, 2 ; Put at the top of your script. MButton:: ; Start this script when the Middle Mouse Button is pressed ;ifWinActive, Your App

我正在尝试制作一个脚本,使我能够继续按某个键,例如1,当我按住鼠标左键超过0.5秒时,该脚本将继续,直到释放鼠标左键


希望有人能帮我。你可以试试这样的。我使用鼠标中键进行测试

我注释掉了特定于应用程序的行

SetTitleMatchMode, 2 ; Put at the top of your script.

MButton:: ; Start this script when the Middle Mouse Button is pressed
;ifWinActive, Your Application Name ; Place the application name as in the windows title.
;{
    KeyWait, MButton, T0.5 ; Wait for MButton to be released within 0.5 sec
    if  (ErrorLevel) ; Not released within 0.5 sec.
    {
        Send, {1 Down} ; Press 1 down, will not autorepeat unless placed in a while loop
        KeyWait, MButton ; Wait for Mbutton to be released
        Send, {1 Up} ; Once MButton is released, undo the press 1 down
    }
    else ; If MButton was released within 0.5 sec.
    {
        Click ; press click
    }
;}
;else
;{
;   Click ; perform normal click behaviour when outside of the target application
;}
Return

你确定吗?这将禁用诸如拖放之类的功能,除非您将此函数设置为特定于应用程序或有选择地暂停运行脚本。我的思维能力非常差,因此无法使此脚本正常工作对我来说可能意味着几件事。你能说得更具体些吗。你在哪里遇到问题?