AutoHotkey / AutoHotkeyDocs

Documentation for AutoHotkey
https://autohotkey.com/
375 stars 746 forks source link

hotstring helper doesnt work as intended. #694

Closed namoran closed 3 months ago

namoran commented 3 months ago

I am trying to use hotstring help as part of my work. I have tested this in v1 and v2. when take a newline separated list such as poorly graded well graded gap graded and use hotstring helper in either v1 or v2 I user my new hotstring and what is output is

poorly gradednwell gradedngap graded

however, after I reload hotstring helper, it works as intended producing

poorly graded well graded gap graded

Please let me know what I need to do to get this working correctly.

Ragnar-F commented 3 months ago

After creating a hotstring, it is activated with the Hotstring function.

After reloading the script, the hotstring is activated via the newly added hotstring definition.

In short:

Hotstring(":T:test", "A``nB``nC")
; vs.
:T:test::A`nB`nC

In the first case, escape sequences such as `n are not resolved. One way to fix this is to add the Deref function to the script and replace Hotstring Entered.Label, Entered.Replacement with Hotstring Entered.Label, Deref(Entered.Replacement).

The Hotstring Helper is not perfect, but keep in mind that it is just an example. If you have further questions, please use the forum or other support channels.