仅在字母数字字符之后才触发热字符串 [英] Trigger hotstring ONLY when preceded by alphanumberic characters

查看:77
本文介绍了仅在字母数字字符之后才触发热字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在热字符串(例如:?:btw::by the way)中使用?允许热字符串在字母数字字符后触发.但是,是否有一种方法可以使它在字母数字字符前面时仅启动?例如,因此它不会在#btw@btw:btw或类似版本上触发.

I know about using ? in a hotstring (e.g. :?:btw::by the way) to allow the hotstring to fire after an alphanumberic character. However, is there a way to make it fire only when preceded by an alphanumberic character? For example, so it doesn't trigger on #btw or @btw or :btw or similar.

推荐答案

RegEx支持的动态热字符串可以为您完成此操作.将上述库与脚本保存在同一目录中,然后运行以下命令:

The library RegEx Powered Dynamic Hotstrings can do this for you. Save the above library in the same directory as your script and run the following:

#Include DynamicHotstrings.ahk

hotstrings("[\w]btw", "btw") ; [\w] is the regular expression for a single character word
Return

btw:
    SendInput, by the way
Return

这篇关于仅在字母数字字符之后才触发热字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆