AutoHotKey在发送SendInput指令时会自动发送其他其他按键,如何避免这种问题?

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: AutoHotKey在发送SendInput指令时会自动发送其他其他按键,如何避免这种问题?

Re: AutoHotKey在发送SendInput指令时会自动发送其他其他按键,如何避免这种问题?

by jimzhangao » 23 Feb 2022, 02:57

在按键序列的首个项目前加上{blind}
比如sendinput {blind}{E down}

Re: AutoHotKey在发送SendInput指令时会自动发送其他其他按键,如何避免这种问题?

by wz520 » 22 Jan 2022, 01:02

把大写的 E 改成小写的 e 试试

AutoHotKey在发送SendInput指令时会自动发送其他其他按键,如何避免这种问题?

by MirrorAZ » 10 Dec 2021, 21:30

代码如下,功能仅仅是快速按两下E键

Code: Select all

#IfWinActive
#Persistent
#MenuMaskKey vkFF
#InstallKeybdHook
#InstallMouseHook
#KeyHistory 100
SetBatchLines -1
ListLines Off
KeyHistory

*XButton1::
    SendInput {E down}
    Sleep 20
    SendInput {E up}
    Sleep 150
    SendInput {E down}
    Sleep 20
    SendInput {E up}
return
可在KeyHistory 却发现AHK自己发送了LShift按键,尽管这是被AHK忽略的,可在实际的使用仍然有被发送并体现出来。如何让AHK不生成这些按键指令呢?

Code: Select all

The oldest are listed first.  VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event.  Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #IfWinActive/Exist, U=Unicode character (SendInput).
A0  02A	i	d	0.00	LShift         	
45  012	i	d	0.00	e              	
A0  02A	i	u	0.00	LShift         	
A0  02A	i	d	0.02	LShift         	
45  012	i	u	0.00	e              	
A0  02A	i	u	0.00	LShift         	
05  000	s	u	0.13	XButton1       	
A0  02A	i	d	0.03	LShift         	
45  012	i	d	0.00	e              	
A0  02A	i	u	0.00	LShift         	
A0  02A	i	d	0.02	LShift         	
45  012	i	u	0.00	e              	
A0  02A	i	u	0.00	LShift         	

Top