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
代码如下,功能仅仅是快速按两下E键
[code]
#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
[/code]
可在KeyHistory 却发现AHK自己发送了LShift按键,尽管这是被AHK忽略的,可在实际的使用仍然有被发送并体现出来。如何让AHK不生成这些按键指令呢?
[code]
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
[/code]