Howdy folks, I am really excited about this new macro and wanted to share it with everybody.
It is based on one of my other macros: Quickly Create an Auto-Correction Expansion With Typinator. But this is a completely new version with a lot more features, and is a lot more stable since it uses Typinator's AppleScript dictionary instead of GUI scripting. Therefore I am posting it separately from the other macro so as to (hopefully) not cause confusion.
One caveat: to get the most out of this macro, you should also use Aspell to get a list of spelling suggestions. More info on Aspell can be found here: Use Aspell (Homebrew Package) to Spell Check a Word. You can however simply disable the Aspell portions of the macro if you don't need any spelling suggestions; the macro will work fine without them, but you'll just have to verify correct spelling yourself. If you DO use Aspell, be sure to setup your
ENV_PATH
variable by following the instructions in this link: Create a PATH Environment Variable for Keyboard Maestro and Add /usr/local/bin to the Default Path - Questions & Suggestions - Keyboard Maestro Discourse
On to the new features of the macro itself:
- Ability to use the same macro to for multiple sets by assigning multiple triggers.
- Searches your specified Typinator set to see if the misspelled word already exists (if it does, you are notified of such and the macro cancels).
- Uses Aspell to provide a list of spelling suggestions.
- Option to set case handling.
- Option to set format to plain text or HTML.
- Option to add a description (by default it is a timestamp so you can sort by date added in Typinator.
- Option to set the expansion as a "Whole Word" expansion.
- Option to show the results at the end of the macro to confirm what you added.
- Option to paste the new expansion into your front document to replace the misspelled word.
- Option to open Typinator to the newly added expansion at the end of the macro.
Attached are three screen recordings of it in action.
I have been using this new version quite extensively for about a week now, and it has been rock-solid on my machines. But as always there is a potential for incompatibility on other users machines. So if anybody downloads and tries this macro and runs into issues please don't hesitate to reach out and I will try and help troubleshoot the issue as best I can. I would also welcome any feedback as to how the macro can be improved!
-Chris
NOTE: This macro makes use of the following KM version 10 action(s):
Set Next Engine Window Position
If you are running a previous version of KM, simply disable or remove said action(s).
CURRENT VERSION: 3.2.0 (Thursday, February 17, 2022)
v3.2.0 Thursday, February 17, 2022
Finally figured out the proper syntax for case handling and expansion type.
AppleScript has been greatly simplified.
v3.1.0: Monday, February 14, 2022
Added 4 new features!
- Added the ability to use the same macro to add corrections to different sets by setting multiple triggers. The purple-colored variables need to be configured to meet the end-user's needs.
- Set case handling (case does not matter, case must match, case affects expansion).
- Set expansion format (plain text or HTML).
- Added a timestamp as the default description which allows the expansions to be sorted by date added in Typinator.
v3.0.0: Thursday, February 10, 2022
Completely redesigned macro.
Screen recording: Using the suggestion provided by Aspell (click to expand/collapse)
Screen recording: Typing in a manual entry and description (click to expand/collapse)
Screen recording: Version 3.2.0 features: case handling and time stamp (click to expand/collapse)
Macro screenshot: Sorry it's all collapsed, expanded the image is too large (click to expand/collapse)
05)[AS-TYP] Create autocorrection expansion.kmmacros (109 KB)