Set context window for a group of abbreviation strings (text expander)

Discussion, questions and support.
Post Reply
phbfast
Posts: 3
Joined: Jun 2nd, ’22, 18:49

Post by phbfast » Jun 2nd, ’22, 19:04

Hello,

I would like to group a number of abbreviations (I understood the best way is to group them in a Tab of Text Expander) but then make them (all) active only under a certain context (window/app). For example:
1. I set 3 abbreviations - "phb1", "phb2" and "phb3";
2. When I type "phb" the list of 3 options will pop up so that I can choose which.

Now I want this to be activated only when I'm on a certain app/window. E.g.: Slack.

Is there a simple solution for this (considering that there may be n abbreviations)?

Thanks.
User avatar
Marko
Posts: 1718
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jun 2nd, ’22, 22:04

Try multiple substitutes.

Abbreviation: phb

Substitute:
First
/Second
/Third

Window: Slack

https://fastkeysautomation.com/documentation5/Send.html
phbfast
Posts: 3
Joined: Jun 2nd, ’22, 18:49

Post by phbfast » Jun 3rd, ’22, 19:53

Hi Marko, thanks for your reply.

I had seen the "multiple substitutes" but that did not seem to address what I was looking for.
Apparenty I failed to explain (or biased you) in my previous description by restricting to the same (prefix) abbreviation. What I basically meant was, to see if I could define a number of (different - not same prefix) abbreviations and group/categorize them for different contexts (window/app). I.e., if I place an abbreviation in a "group" it means it belongs to that context(s). Instead of setting the context for each one.

Does that make any sense?
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jun 4th, ’22, 09:59

This is currently not possible, you would need to set the context window for each item.
Alternatively you could group the items into the Phrase file and then set the restriction once.
phbfast
Posts: 3
Joined: Jun 2nd, ’22, 18:49

Post by phbfast » Jun 4th, ’22, 18:06

I had a look at the Phrase file option but it appears to be quite limitative. I tried with a substitution phrase with a few (10+) lines and apparently it messes everything. But then I looked at the documentation and presumably that is "expected" since it is meant for "simple Strings and Substitution phrases".

Thanks anyway Tom.
Cheers.
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jun 5th, ’22, 07:00

The limitation is that some macros are not available. Can you give me the example of the problematic phrase?
Post Reply