Quickly Create a Regex Expansion With Typinator

Howdy folks, in addition to my macro to add an auto-correction expansion to Typinator, (Quickly Create an Auto-Correction Expansion With Typinator), I have just finished building one to add a RegEx expansion.

Complete details on how this macro works (and how to configure and use it) are in the yellow comments in the macro itself. But the clef notes version is this will show a prompt allowing you to select from a list of all your RegEx sets (according to the parameter you supplied in the purple variable), and then allow you to insert both your RegEx and expansion. It will then add that to the RegEx set you picked from the list.

Attached is a screen recording of it in action.

This is a brand new macro; I just built it last night and have only tested it last night and this morning. It works quite well for me since it's based primarily on the macro I linked to at the top of this post, so the groundwork is well-established. But I am always happy to hear feedback on how my macros can be improved, so don't hesitate to reach out if you have any suggestions or constructive criticism!

-Chris

NOTE: This macro makes use of the following KM version 10 action(s):
Set Next Engine Window
If you are running a previous version of KM, simply disable or remove said action(s).

CURRENT VERSION: 2.1.0 (Wednesday, February 09, 2022)

v2.1.0: Wednesday, February 09, 2022
Added lines to the AppleScript to save and restore original clipboard at end of macro.
Removed AppleScript to verify that the Typinator fields had been set to the abbreviation and expansions since for some reason it was causing it to get stuck waiting. Will try and troubleshoot that and add it back in a future release.

v2.0.1: Tuesday, February 08, 2022
Added action to remove the last line separator from the variable to prevent an empty menu entry.

v2.0.0: Tuesday, February 08, 2022
Added an AppleScript to return any RegEx Sets matching a specified search parameter (set in the AppleScript itself or via a KM variable).

v1.0.0: Monday, February 07, 2022
Initial macro (not posted to forum)

add RegEx to Typinator macro

Screenshot of the expansion in Typinator:

Screen Shot 2022-02-08 at 09.39.54

08)[AS-TYP] Create RegEx expansion.kmmacros (61 KB)

Macro screenshot (click to expand/collapse)

1 Like

Howdy folks, the last couple of days have seen a couple of changes to improve and fix a broken feature in the macro. All details are in post 1.

-Chris