Selectively sync Macro Groups without Sync File?

I wonder if anyone has any easier workarounds.. I use KM for both work and personal stuff. Unfortunately, there could be sensitive information in the work macros and KM logs so I can't really sync :frowning: with my home setup..

I'd like to share my work macros with colleagues and have them all be in sync in our protected network, though. And also be able to sync personal macros with myself. Is there a workaround that people have thought of? The only thing I can think of is to use KM menus to select a Macro Group, delete it, and then have another macro import macros from a synced Dropbox folder. If there are any easier solutions I'd appreciate tips!

1 Like

AFAIK, there is no provision to selectively sync Macros in KM -- it's an all or nothing situation.

The only un-tested idea I have is not really syncing, but is sharing selected Macros.

  1. You could select only the Macros for Work (or Home), and then export them to a Dropbox folder that is properly shared with the appropriate people, or to a folder on your local file server at work.
  2. To make this easy, I would add a text tag, like "@Work" and "@Home" to each macro name, so that you could do a KM global search to quickly find them.
  3. Start out by exporting all Macros of interest.
  4. Then each period (day, week, etc), export only those Macros that have changed. To identify those Macros, use the modified: search qualifier, like "mod:1d"
    • So, to search for Work Macros modified in the last day, use this search:
      n:@Work mod:1d
  5. For work, you can send an email with a link to the Macro update file.

This is not ideal, but may be the best you can do.

1 Like

Thank you JMichaelTX using the modified date is an efficient trick, I'm stealing that idea! This is the delete macro/import macro workaround that could run every 24 hours.. I'm a bit uneasy about the delete part of this.. but if it will definitely always target the correct macro group it could be a good way to stay in sync..

Stealing not required -- I gave it away to all! :wink:

As with any new process that deletes stuff, be sure you do a good backup before you start.
Please lets know how you system works out, as I'm sure others will be interested.

Hey Jay,

Without knowing more about how your work macros are arranged in terms of macro_groups/macros it's hard to think of the most efficient method of doing this.

I like @JMichaelTX's idea of using a Smart Group to find recently modified macros.

I don't like the fact that we can't get very far into a Smart Group with AppleScript.

@peternlewis – It would be nice if we could access the macros in a Smart Group via AppleScript – and it would be totally awesome if we could get the XML of macros directly as a property of the macro class.

Here are some pieces that may or may not fit the puzzle:

You can directly delete macro groups:

tell application "Keyboard Maestro"
   delete macro group "Shared Business Group"
end tell

You can directly delete macros by unique macro name or macro UUID:

tell application "Keyboard Maestro"
   delete macro "Unique Macro Name"
   # OR
   delete macro "MACRO_UUID"
end tell

I can think of a couple of ways to handle modified macros as singles.





Thanks so much! I realize I'm reviving a 3 year old thread, but I've been refining/creating a big set of macros for myself and a bunch of my colleagues and this really helped set up an automated update macro.

Since this is a situation where I'm really the only one modifying the macros, the one way sync is relatively simple. Here's a version of the macro (with sensitive info removed)