How to automate editing KM macros

I have a large palette with over 20 options. It was created using my desktop keyboard to be triggered by Shift+Option+Command+S. So every macro in the palette has that as its hotkey trigger.

Now I would like to also trigger the palette using Shift+Control+Option+S because the keyboard on my laptop is arranged slightly differently.

I would like to be able to automate opening a macro for editing, adding a new hotkey trigger, typing the Shift+Control+Option+S hotkey, closing the macro and possibly moving to the next one.

But I haven't yet been able to get a KM macro to operate upon the KM Editor.

Is this even possible?

For instance, I have the first action of a test macro:
Where Image is an entry in the macro groups in the KM Editor:

When I click the Go button in the action, it properly highlights the macro group menu item. But when I run the macro, it does not click the mouse, it flashes the screen.

Is manipulating the KM Editor possible with KM? What am I missing?

Maybe this by @gglick will help (I can vouch that these Macros work very well and I’ve used them many times)

1 Like


Do they work out-of-the-box with KM10? The item says KM8.

The technique here, using AppleScript to extract info from KM macros as XML and then adding the XML back in to other macros, looks powerful.

Yes. I still use them and I have KM10. EDIT: needless to say - backup before doing any sort of batch stuff on your Macros!

1 Like

@Zabobon & @August I have it set up that way on my end:


With the “Delete” macro, I first delete the shortcut of the macros in question:

06)Delete <8065 220208T122640>.kmmacros (3,2 KB)

Click to show image

To distribute the new shortcut(s) to all macros, I create the hotkey triggers (blue) in a macro (here the first one). Now I execute the “Shortcut” macro.

04)Shortcut <7512 220208T122625>.kmmacros (8,7 KB)

Click to show image

Now, the hotkey trigger(s) are copied first. The macro then pauses until I select the other macros (not blue).
After pressing the escape key, the macro continues and the new hotkey triggers are set.

Note: The HUD display indicator that pops up (red action) requires the BetterTouchTool app. I have disabled the action for now.