Expanding a text with backspace at the end

307 views Asked by At

I am new to autohotkey and I'm trying to expand a text but I need to add a "backspace" at the end of the sentence, for example:

::btw::by the way
return

works fine, except that when I get the expansion, I get a space at the end,

if I do this

::sq::start quote"
return

I would like to be able to type right after the "(quote) symbol, (instead i get (start quote " text") {check the space before " text")
My expectation = ( start quote "text" )

I want to do something like this:

::sq::start quote"{bs}
return

but Im not getting the result I need.

Thank you so much in advance

1

There are 1 answers

0
TessellatingHeckler On BEST ANSWER

Put an O in the options between the first two colons:

:O:sq::start quote"

From the help:

O: Omit the ending character of auto-replace hotstrings when the replacement is produced. This is useful when you want a hotstring to be kept unambiguous by still requiring an ending character, but don't actually want the ending character to be shown on the screen. For example, if :o:ar::aristocrat is a hotstring, typing "ar" followed by the spacebar will produce "aristocrat" with no trailing space, which allows you to make the word plural or possessive without having to backspace. Use O0 (the letter O followed by a zero) to turn this option back off.

http://ahkscript.org/docs/Hotstrings.htm