Text Expander - Phrase files
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
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
Try this:FastM wrote:
Abbreviation Substitute
"m " "Monday "
"t " "Tuesday "
Abbreviation: m
Substitute: Monday{SPACE}
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
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
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.
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.
You can also remove apostrophe from the Ending characters list in Preferences/Text Expander.
Thanks again EnnovyEnnovy 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.
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
Hello MarkoMarko wrote:
You can also remove apostrophe from the Ending characters list in Preferences/Text Expander.
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
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.
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.
@ FastM
Another way is:
String: \d
Description: Day of the week
Type: Send
Substitute:
When you type the string, you will see a popup menu from wich you can choose
Another way is:
String: \d
Description: Day of the week
Type: Send
Substitute:
Code: Select all
Monday
/Tuesday
/Wednesday
/Thursday
/Friday
/Saturday
/Sunday
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
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