AutoHotKey: Instant Text Replaces

One part of my AutoHotKey script replaces @@ my email address. I am currently doing it like this:

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

Simple enough, and it works quite well, but you need to press the space / comma / period / etc before replacing. Is there a way to instantly replace it without any further interaction - is it replaced as soon as the criteria are matched?

After the AutoHotKey documentation , I tried:

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

but it just clears @@ .

+6
source share
1 answer

You are looking for option * in your hotline. This option replaces the string as soon as it is detected without an additional key.

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

will achieve what you are looking for.

The documentation for the parameters is here: http://www.autohotkey.com/docs/Hotstrings.htm

+12
source

Source: https://habr.com/ru/post/926831/


All Articles