2017-09-25 69 views
0

我在一个不同的脚本中有一个热键程序,我尝试触发(#u::),它似乎有一个错误行为。即使在指示释放时,Windows中的脚本仍然按下按钮

脚本#1:

#MenuMaskKey vk07 
#u:: 
msgbox,,test 
return 

脚本#2正试图触发#U ::热键:

#SingleInstance 
#NoEnv 
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. 
#MenuMaskKey vk07 
SendLevel, 10 
Send, #{u} ; This successfully triggers the hotkey but now it holds down the # button 

sleep, 1000 
Send, {RWin Up} ;Here I am trying to release it but it still doesn't let it go 

顺便说一句,这种情况与所有其他修饰,太像移, alt和控制。

我在最新版本(v1.1.26.01)上。

回答

1

试试这个:

脚本#1:

#InstallKeybdHook 
#UseHook 
#MenuMaskKey vk07 

#u:: msgbox, test 

脚本#2正试图触发#U ::热键:

#SingleInstance 
#NoEnv 
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. 
#MenuMaskKey vk07 

SendLevel 1 
SendInput, {LWin down}u{LWin Up} 
If GetKeyState("LWin") 
    Send {LWin Up} 
If GetKeyState("RWin") 
    Send {RWin Up} 
+0

SendInput {伦下来} U {LWin Up}做到了!其余是不必要的。 – Ahmed

相关问题