Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Autohotkey 仅当前面有字母数字字符时触发热字符串_Autohotkey - Fatal编程技术网

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

这似乎是更新版本: