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不允许您使用相同的热键打开/关闭场景,所以这就是我所做的,但我无法忍受我的解决方案:(
解决方案
推荐阅读
- excel - 1004 对象“_Worksheet”的方法“范围”未能引用另一个工作表
- python - Python 3 的导入似乎无法正常工作
- c++ - 正确实现二维向量种群
- bind - 如何在 ionic 4 中绑定离子按钮的背景颜色
- sql - ASP.NET 登录和注册在 Visual Studio 中有效,但在发布到 IIS 时无效
- python - Tensorflow:压缩两个不同形状的张量的第一维
- sql - HQL 查询中不需要的隐式内部联接
- java - Transactional Producer vs Just Idempotent Producer Java (Exception OutOfOrderSequenceException)
- anaconda - Anaconda 返回错误“系统找不到指定的文件”
- r - 如果 ==0,则仅替换指定列中的值