1
votes

I have a weird problem regarding hotstrings:

Everytime I delete any non-hotstring word by using either

ctrl + a, backspace

or

ctrl + backspace

(I will now call them §),

all hotstrings will no longer trigger after that (tested in different applications). They somehow work again when I insert a whitespace character like space or enter before I write the next hotstring.

This problem does not occur if I...

  • delete a working hotstring (also using §)
  • delete a non-hotstring word by just using backspace repeatedly

Note: my test script for this is just one line:

:*:bzw::beziehungsweise

Am I doing something wrong, or is this a bug? (I'm using AHK version 1.1.29.01 on Windows 8.1)

1
I am unable to recreate this issue. When I run the same test script and type bzq it replaces it with beziehungsweise. I then ctrl + backspace and type bzq and the string is replaced correctly. Is this not what you are seeing? - Zack Tarr
Did you mean "bzw" in both cases? If I type bzq (which shouldn't trigger the hotstring), then ctrl + backspace, and then type bzw (which should work), nothing happens. If however I type bzw, which triggers the hotrstring, and then use ctrl + backspace on "beziehungsweise", hotsttrings will work after that. - scavi
Yes you are correct. I tested with the bzw let me retest that. Edit: Yes I am seeing the same issue. No clue on the fix doing some reading. - Zack Tarr
Hey, wanted to share this site as well. Ive posted on both stack and the AHK forums before to get help, might not hurt in this case as well. autohotkey.com/boards/… - Zack Tarr

1 Answers

1
votes

Backspace doesn't reset the hotstring recognizer. When you type bzq followed by ctrl + backspace Autohotkey isn't ready to interpret the input as a new hotstring. To reset hotstring recognizer use Hotstring("Reset") (https://autohotkey.com/docs/commands/Hotstring.htm#Reset). In my scripts I deal with ctrl + backspace in the following way:

Ctrl & Backspace::
    SendInput ^`b
    Hotstring("Reset")
Return