How to make a predefined macro with one Keystroke action and a trigger

Once again, @ccstone's AppleScript and KM8's new menu actions come to the rescue (be sure to edit the macro group name at the top of the script, on the "set macroGroupName to "Test Group" line, to the one you want for your own macros):

New Predefined Macro.kmmacros (6.2 KB)

I started with the script Chris shared here, added a line to ensure KM would be made the frontmost app if it wasn't already, added new entries for the newly created macro's trigger and actions using the excellent Script Debugger to grab the XML for each, and finished it off with KM8's own native "Edit Name" menu item. It run at an average of about 0.64 seconds on my system and seems to work just as you specified, but let me know if you run into any issues with it.

1 Like