Trigger Value for Typed String

Hi,

Wondering if this is the best way to implement typed string expansions.

Previously, I separated each expansion macro, but now I am experimenting with using the Trigger Value to consolidate everything into one macro. Can anyone suggest any improvements to this approach?

I understand that both ways do work, are there any cons to using Trigger Value for a large expansion macro?

Trigger Value Macro Image (click to expand/collapse)

Separated Macro Image (click to expand/collapse)

image

Thanks

Hey Jack,

There's nothing wrong with that approach, although I personally wouldn't want to have many of those that were massive (then again I primarily use Typinator for text-expansions).

Here's an example of a KM macro using a regular expression for the typed-string-trigger.

;d<any text><space>

So ;d makes the macro hot – the space character terminates it – and the trigger-value returns all of it.

This way you don't have to explicitly set up the triggers – just the switch action.

-Chris


Download: Macro with Multiple Typed-Triggers Using RegEx v1.00.kmmacros (8.7 KB)

Macro-Image

Keyboard Maestro Export

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2

3 Likes

Hey Chris,
I haven't played around with regular expressions yet. The attached macro isn't working for me.

Thanks

Is the macro and macro group active?

Did you type:

;dt<space>

or

;dmd<space>

** means a literal space character.

missed the space. Thanks

How can I make Macro 1 work with ; and / I tried using [;\/]dyt+[ ] but it doesn't trigger anything. I was able to get Macro 2 to work correctly, but I'm trying to consolidate both into one regular expression

Macro Image 1

image

Macro Image 2

Edit

I think i figure it out using the ICU Standard [;\/][tdy].+[ ]

Macro Image

image

Macro

Date Expansion.kmmacros (6.6 KB)

Do a forum search for β€˜Brevis’ which does precisely that.