autohotkey - 如何在 AutoHotKey 中获取大写的实际热字串?
问题描述
我在 AutoHotKey 中使用热字符串,输出取决于字符是否大写。有没有办法确定触发热键的键中的字符是否大写?我尝试使用 A_ThisHotkey,但它似乎不区分大小写。如果您有解决方案,请告诉我。谢谢。
解决方案
我不知道这样做的内置方法,但也许你只需创建更多的热字符串并使用区分大小写的C
选项就可以了,如下所示:
:C:hello::
:C:Hello::
:C:HeLLo::
:C:HELLO::
MsgBox, % A_ThisHotkey
return
来自评论的示例请求:
hotstrings := "hello,HELLO,HeLlo,HellO,hElLo,hellO"
for each, hotstring in StrSplit(hotstrings, ",")
Hotstring(":CB0*?:" hotstring, Func("MyFunction"))
return
MyFunction()
{
MsgBox, % "Hotstring triggered!`n" A_ThisHotkey
}
推荐阅读
- lua - '结束'预计在'附近'
' 我的代码中的错误 - java - 如何使用 Azure Java SDK 从 Java 后端连接到 Azure Key Vault?
- python - Scipy.linalg 矩阵乘法实现,全部在 C 中还是在 Fortran 中?
- angular - 无法到达这一边 - Windows 10 上的 docker 中的角度
- java - 如何在 Java 中将整数的 HashSet 转换为逗号分隔的字符串
- mongodb - MongoDB事务澄清
- java - 权限被拒绝尝试在 Android 操作系统中启动脚本执行
- postgresql - 源驱动程序:未知驱动程序 postgres(忘记导入?)即使正在导入 lib/pq
- architecture - 微服务架构中的授权方式
- arrays - 索引超出范围 SwiftUI