【问题标题】:AutoHotKey: Instant text replaceAutoHotKey:即时文本替换
【发布时间】:2012-09-24 06:32:59
【问题描述】:

我的 AutoHotKey 脚本的一部分将 @@ 替换为我的电子邮件地址。目前,我正在这样做:

::@@::
SendInput, example@domain.com
return

足够简单,它工作得相当好,但你需要在替换之前推动空格/逗号/句点/等。有没有办法在没有任何进一步交互的情况下立即替换它 - 只要符合条件,它就会被替换?

按照the AutoHotKey documentation,我试过了:

StringReplace, var_Email, var_Email, @@, example@domain.com, All

但它只是清除了@@

【问题讨论】:

    标签: text replace autohotkey instant


    【解决方案1】:

    您正在寻找热字串中的 * 选项。此选项会在检测到字符串时立即替换字符串,而无需额外的密钥。

    :*:@@::example@domain.com
    

    将实现您的目标。

    选项的文档位于此处:http://www.autohotkey.com/docs/Hotstrings.htm

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-10
      • 1970-01-01
      • 1970-01-01
      • 2014-03-09
      • 1970-01-01
      • 1970-01-01
      • 2011-11-16
      • 1970-01-01
      相关资源
      最近更新 更多