Text Expander - Phrase files

Discussion, questions and support.
Post Reply
FastM
Posts: 21
Joined: Oct 24th, ’14, 04:25

Post by FastM » Nov 4th, ’14, 18:37

Sorry Marko - I seem to be bombarding you with questions.

I have created a phrase file to insert days of the week.

Abbreviation Substitute

"m " "Monday "
"t " "Tuesday "

So if I type "m " (i.e. the letter m followed by a space) it should substitute "Monday " (i.e. the word Monday followed by a space) - I have only shown quotes here so that you can see the spaces.

The substitution works fine but for some reason doesn't add the space after the word Monday. If in the substitute text I insert a line break after the space the space is inserted but not otherwise.

So my question is how can I insert a space after the substituted text.

Many thanks inn advance

FastM
User avatar
Ennovy
Posts: 70
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Nov 4th, ’14, 19:09

FastM wrote:

Abbreviation Substitute
"m " "Monday "
"t " "Tuesday "
Try this:
Abbreviation: m
Substitute: Monday{SPACE}
FastM
Posts: 21
Joined: Oct 24th, ’14, 04:25

Post by FastM » Nov 5th, ’14, 14:37

Many thanks Ennovy

You beat me to it.

I was just looking at some of my old AutoHotkey scripts and noticed that they were using {SPACE} to achieve the same result.

I am afraid that it didn't occur to me that you could use {SPACE} in the substitute field in FastKeys - so thank you for the insight. Now that you have pointed it out it seems obvious.

Any thoughts on how if I set it to trigger immediately I can stop it triggering after and apostrophe "s" (e.g after say's). The whole word option seems to treat apostrophes as a word break.

Thanks again

FastM
User avatar
Ennovy
Posts: 70
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Nov 5th, ’14, 19:03

Glad that I could help you :)

I use a special key to trigger Text Expander, for instance:
Abbreveation: \m
Substitute: Monday{SPACE}

You can use any key you like. In this way you have more control when an abbreveation has to be triggered.
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Nov 5th, ’14, 22:29

You can also remove apostrophe from the Ending characters list in Preferences/Text Expander.
FastM
Posts: 21
Joined: Oct 24th, ’14, 04:25

Post by FastM » Nov 5th, ’14, 22:53

Ennovy wrote:

Glad that I could help you :)

I use a special key to trigger Text Expander, for instance:
Abbreveation: \m
Substitute: Monday{SPACE}

You can use any key you like. In this way you have more control when an abbreveation has to be triggered.
Thanks again Ennovy

I have used the \ key and others for other phrases but have never find them quite as intuitive. I just thought it would be convenient in this case to type for example the letter "s" followed by a space.

Anyway thanks again for your help.

Fastm
FastM
Posts: 21
Joined: Oct 24th, ’14, 04:25

Post by FastM » Nov 6th, ’14, 00:46

Marko wrote:

You can also remove apostrophe from the Ending characters list in Preferences/Text Expander.
Hello Marko

Many thanks for the suggestion but I am not sure it is the answer to my question. I fear that I may not have explained the problem clearly enough.

My objective was to use the letter "s" with a space after it as the abbreviation that would, with "Trigger immediately" checked, insert the word "Saturday".

If one types s with a space after it in isolation it works fine and inserts the word Saturday.

If one types a normal word such as "houses" with a space after it the abbreviation is, as one would expect, ignored and no word is inserted.

However if one types a word with an apostrophe "s" at the end, such as cat's, the abbreviation triggers and inserts the word Saturday at the end of cat. In other words FastKeys treats the apostrophe as a word separator in exactly the same way as it treats a space between words. Removing the apostrophe from the Ending characters list doesn't appear to alter this behaviour.

Hopefully this explanation is a little clearer.

Many thanks

FastM
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Nov 6th, ’14, 20:05

Hi FastM,

ok, I see. Ending Characters list only defines the characters which trigger the substitution and not the characters which break the word. Apostrophe, like many other characters, breaks the word. This is a shortcoming of using one letter string abbreviations because of possible side effects like in your example.

So you could do as suggested by Ennovy or maybe use "Manual confirmation" option. I could also think of other ways of doing this. for example using shortcuts etc.
User avatar
Ennovy
Posts: 70
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Nov 6th, ’14, 21:22

@ FastM

Another way is:

String: \d
Description: Day of the week
Type: Send
Substitute:

Code: Select all

Monday
/Tuesday
/Wednesday
/Thursday
/Friday
/Saturday
/Sunday
When you type the string, you will see a popup menu from wich you can choose
FastM
Posts: 21
Joined: Oct 24th, ’14, 04:25

Post by FastM » Nov 7th, ’14, 23:40

Thanks Marko and thanks Ennovy

I realise there are other ways of achieving the same thing - I just wondered whether there was a way of stopping an apostrophe from acting as a word break. It seems from what you say that this is a limitation of AutoHotkey and there is not much that can be done about it.

Anyway thanks to you both for your time and thoughtful answers - they were much appreciated.

FastM
Post Reply