Autohotkey 仅当前面有字母数字字符时触发热字符串
我知道在热字符串中使用Autohotkey 仅当前面有字母数字字符时触发热字符串,autohotkey,Autohotkey,我知道在热字符串中使用?(例如,:?:顺便说一句,)允许热字符串在字母数字字符后触发。但是,有没有一种方法可以让它在前面加字母数字字符时只触发?例如,它不会在#btw或@btw或:btw或类似的情况下触发。我唯一能想到的就是为每个字母数字字符生成一个热字符串 :?:abtw::by the way :?:bbtw::by the way :?:cbtw::by the way . . . :?:Ybtw::by the way :?:Zbtw::by the way :?:1btw::by th
?
(例如,:?:顺便说一句,
)允许热字符串在字母数字字符后触发。但是,有没有一种方法可以让它在前面加字母数字字符时只触发?例如,它不会在#btw
或@btw
或:btw
或类似的情况下触发。我唯一能想到的就是为每个字母数字字符生成一个热字符串
:?:abtw::by the way
:?:bbtw::by the way
:?:cbtw::by the way
.
.
.
:?:Ybtw::by the way
:?:Zbtw::by the way
:?:1btw::by the way
.
.
.
图书馆可以为你做这件事。将上述库保存在与脚本相同的目录中,并运行以下操作:
#Include DynamicHotstrings.ahk
hotstrings("[\w]btw", "btw") ; [\w] is the regular expression for a single character word
Return
btw:
SendInput, by the way
Return
这似乎是更新版本: