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

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 请教send总是黏住前面一行按键的问题

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

Post by pk23 » 17 Oct 2018, 09:25

脚本如下,很简单。但实际测试

如果把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

Top