Efficient Way to Move Macros to a New Mac

Now that the sync is complete I'm having problems. Whenever I disable a Macro on my new m1 Mac, it disables the same macro on my 2009 iMac which isn't ideal for me. Some Macros I only need on the iMac and some I need on both Macs. Others I need but the M1 still doesn't have all the software required installed.

Is there a solution for this?

Of course you can do this. You can modify your macro to test which Mac you are on and exit the macro if it's on the wrong Mac. You can create an IF statement and check the value of %MacName%.

Or perhaps even better, your macros meant to run only on one machine can be placed in a group, and the macros in that group can test against the group name instead, using %ExecutingMacroGroup%.

Or what new KM mechanism would you like to see that prevents synching from happening when you have synching turned on?

Yes. There are several solutions. The simplest is - Groups can be disabled on specific Macs:

image

And if it's a specific Macro that you want to do different things depending on the Mac it is run on you can use a Switch Case Action using the Mac's name.

image

Lots and lots of ways to make this work. I also have different Macs with different Keyboard Maestro needs and syncing the Macro Library has never been an issue.

But your original questions was:

In which case, let the sync complete on the new Mac (which it must have done) and then switch syncing off on the new Mac. Then delete any Macro you don't want on the new Mac. You will have moved any Macros you want over to the new Mac and no future syncing will happen on the new Mac.

But this is not what I would ever do. One of the simplest things I love to use Keyboard Maestro for, is to change the default shortcuts in Apps. And I want those shortcuts to be the same no matter which of my Macs I am working on. Syncing allows my to change a shortcut in say, Photoshop to be the key combination I would prefer and I know that shortcut will be the same on any Mac I am working on. I also know that when I buy and setup a new Mac I won't have to go into Photoshop and change all those shortcuts - Keyboard Maestro will have done it for me.

1 Like

Those ideas are better than mine. But they all work. I'm not sure which one I would chose.

Hey Guys,

Migrating everything Keyboard Maestro including variables and named clipboards to another Mac is as simple as:

  • Installing Keyboard Maestro on the new Mac.
  • Copying one app-support folder over to the new Mac.
  • Copying Keyboard Maestro's preferences to the new Mac.

How do I backup / migrate / transfer my installation to another Mac?

This has been the basic strategy for most apps for decades, although occasionally an app might have some other files tucked away somewhere.

-Chris


Please read Peter's addendum in the very next post.


Just remember that if you intend to use both Macs afterwards, this note applies:

If you copy the com.stairways.keyboardmaestro.* files, the new Mac will have the same MacUUID token and be considered the same Mac for syncing purposes, so you should not do this if you intend to continue using the old Mac.

If you intend to use both Macs, you need to manually delete the MacUUID and MacRemoteUUID entries with:

defaults delete com.stairways.keyboardmaestro.engine MacUUID
defaults delete com.stairways.keyboardmaestro.engine MacRemoteUUID 
2 Likes

Hello @Zabobon,

I am following your instructions. Sync ON for both desktop and laptop. Where do you set the path?

Thank you very much.

The steps are:

  1. Start on the Mac that has all your Macros as you want them.

In Keyboard Maestro Preferences on that Mac, check "Sync Macros"

This will bring up this Dialog and (on the first Mac) you choose "Create New"

This will bring up the standard Mac Navigation Dialog, where you can navigate to a Folder on your Dropbox (where you want to store the Sync File).

  1. Now, on the second Mac (the one that you want to replace all its Macros with your Master version you just made) you do the same steps but choose "Open Existing..."

You will get a warning that this will replace all the Macros on this machine.

From here, you navigate to the Sync File that you made in step 1. And you select it. It will look like this:

image

The really important thing to bear in mind is that each additional Mac you add to the syncing will initially have all its Macros replaced by you Master sync version.

But from now on all the Macros will stay in sync, no matter which of the Macs you make changes on. You can add additional Macs by repeating step 2.

If you already have two Macs, with very different collections of Macros, before trying to sync you need to make sure you have all the Macros you want on the first Mac by manually copying them over. In other words, make the KM Library on the first Mac exactly as you want all your Macs to be going forward before you attempt any syncing.

And... make sure Dropbox has fully done all its syncing of files before adding Mac 2.

Which leads to... always a good idea to have backups before you attempt any of this... :grinning:

It's also worth reading through this:

https://wiki.keyboardmaestro.com/manual/Macro_Syncing?s[]=sync

2 Likes

thank you very much !

1 Like

Hello @peternlewis

  • where and how do you delete those files ?
  • are the MacUUID and Remote UUIDs regenerated for the new Mac ?
    thank you

Hello @peternlewis

  • where and how do you delete those files ?
  • are the MacUUID and Remote UUIDs regenerated for the new Mac ?
    thank you

Those are commands you type as-is (or Paste, one line at a time) into Terminal. (The defaults utility lets you set defaults, aka "preferences" -- type man defaults in Terminal to learn more.)

Yes -- that's why you are doing this, to force new UUIDs on the new Mac so that they are unique and don't clash with the old ones.

2 Likes

thanks very much !

Just so it is crystal clear to me, you need to perform this step before (after?) you copy the app support and preferences to the new Mac?

I've had issues with slow iCloud syncs and have been burned with sync a few times before. (I know that Dropbox may be a better solution). I don't develop macros on my second Mac so what I really want a one-way sync. Just an automated way of pushing updates to the new Mac on demand would be perfect.

After.

If you copy the files, then both Macs would have the same MacUUID and MacRemoteUUID, which since the UU means “Universally Unique”, is a bad thing.

So after you copy them, run the tow Terminal commands to delete the unique IDs, then Keyboard Maestro will regenerate new unique ones.

1 Like

Yes, iCloud sync is not great.

And I agree, personally I much prefer one-way syncs, it avoids any chance of corruption.

What you can do is actually this:

  • Set up macro syncing on the definitive Mac and save the file to your sync folder with a name like "definitive.kmsync".
  • set up macro syncing on the secondary Mac(s) and save the file to your sync file with a name like "secondary.kmsync".

Have a macro that runs any time you quit or deactivate the Keyboard Maestro editor that copies the definitive.kmsync over the secondary.kmsync.

So then under no circumstances would the source Mac ever change (because no other Mac will ever update the definitive.kmsync file), and the remove Macs will end up with the definitive macros sooner or later no matter how slow the sync is.

2 Likes

Thanks @peternlewis , that is very helpful. I will give that a try.

[edit] One question, on the secondary Mac macro that copies the "definitive.kmsync" to overwrite the "secondary.kmsync", I assume it is ok to delete the "secondary.kmsync" out from underneath the secondary LM editor/engine before the copy happens?

Yes, it's fine.

If you have multiple secondary Macs, you may want to only copy the file if it is actually different, or you could get in to a case where each Mac is copying the identical file, and the sync service keeps syncing them. You could use the md5 util to test if the files are different.

1 Like

Thanks!

Thanks. Came here looking for this info. i've had KM for years and didn't know about this feature. As a rule, one should dig through the settings of apps more frequently. :slight_smile: :stuck_out_tongue: