Windows中的AHK跨脚本即使在指示释放时也可以按住按钮 [英] AHK Across Script in Windows Holds Down the Button Even When Instructed to Release

查看:113
本文介绍了Windows中的AHK跨脚本即使在指示释放时也可以按住按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在尝试触发的脚本中的热键程序(#u::),它似乎有错误的行为.

I have a hotkey program in a different script that I am trying to trigger (#u::) and it seems to have a buggy behavior.

脚本1:

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

试图触发#u ::热键的脚本#2:

Script # 2 that is trying to trigger the #u:: hotkey:

#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

顺便说一句,这与所有其他修饰符一样发生,例如shift,alt和control.

Btw, this occurs with all other modifiers, too like shift, alt, and control.

我使用的是最新版本(v1.1.26.01).

I am on the latest version (v1.1.26.01).

推荐答案

尝试一下:

脚本1:

#InstallKeybdHook
#UseHook
#MenuMaskKey vk07

#u:: msgbox, test

试图触发#u ::热键的脚本#2:

Script # 2 that is trying to trigger the #u:: hotkey:

#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} 

这篇关于Windows中的AHK跨脚本即使在指示释放时也可以按住按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆