Page 1 of 1

请教send总是黏住前面一行按键的问题

Posted: 17 Oct 2018, 09:25
by pk23
脚本如下,很简单。但实际测试

如果把X行的时间调大一点,例如500ms,Y行的行为就正常(只发送鼠标左键单击)

但如果X行调成现在这样200ms,Y行的行为就很怪异,实际测试会表现出Ctrl-LButton的效果,就好像A行的ctrl没有松开一样

我尝试在X和Y两行之间,加入
SendInput, {Ctrl Up}
或者
KeyWait, Ctrl, T3
都不管用,仍然表现的像是Ctrl-LButton。怎样才能修复这个问题呢?谢谢

Code: Select all

Tab & LButton::
    KeyWait, Tab
    KeyWait, LButton
    BlockInput, On

    SendInput, +{LButton}
    Sleep, 200
    SendInput, ^{%groupx%}       ;A行
    Sleep, 200            ;X行
    SendInput, {LButton}        ;Y行
    BlockInput, Off
    return