微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Autohotkey 并不总是发送密钥? 这里发生了什么

如何解决Autohotkey 并不总是发送密钥? 这里发生了什么

基本上我不明白发生了什么,任何澄清都会有帮助

我正在尝试在我的程序中设置热键“_”和“alt _”。所以我制作了一个自动热键脚本,用“_”替换“/”,用“alt _”替换其他新闻,但它似乎并不总是在我的程序中工作? (除非我向命令发送垃圾邮件

我的脚本:

/::
Send _ ;if I keep clicking "/" I always get the desired effect
return

但是当我打开我的程序并按“/”时,它不会启动指定的场景,除非我这样做(但是它总是在文本中用 _ 替换“/”。

/::
Send_ ; This code works fine,I don't need to keep clicking "/" it works the first time but the codes awful
Send_
Send_
Send_
Send_
return

当我使用上述代码时,streamlabs OBS 程序每次都会选取它并切换到适当的场景。但是当我只使用一个 Send _ 时,它有时会立即起作用,有时我需要多次按下它。

我的完整代码(看起来工作正常)如下:

+/:: ; This is the hotkey I press "Shift /" to start the script
toggler := !toggler ; this changes a boolean every time the script is run
if (toggler) { ; Every odd run this happens (hides scene)
    Send +-
    Send +-
    Send +-
    Send +- ;; I feel like all these lines are redundant
    Send +-
    Send +-
    Send +-
    Send +-
    Send +-
    Send +-         
} else { ; every even run this happens (shows scene)
    Send !+-
    Send !+-
    Send !+-
    Send !+- ;; again idk why I need all these lines instead of just 1
    Send !+-
    Send !+-
    Send !+-
    Send !+-
    Send !+-
    Send !+-
}
return

基本上,streamlab obs 不允许您使用相同的热键打开/关闭场景,这就是我所做的,但我无法忍受我的解决方案:(

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。