Finding/Deleting Duplicate Macros

Question: Is there anyway to search for and delete duplicate macros?

Back story:
So I am recovering from a hard drive crash and there were holes in my backup. I use KM on a few of my computers and the one that crashed had the most macros on it. I am able to rebuild my macro library from the other machines and recreating a just a few most recent macros. (Yay for backups!)

On some machines I use macro syncing but because of the way I work some machines are off the grid or for other reasoning aren't being synced. So if I rebuild from all of them there is going to be some duplication of macros. So is there to search for and delete duplicate macros?

I guess I could view all and delete duplicate but that is a manual process... completely against the spirit of this program! ha!!

I don't see any mention of a built in function in the user manual or on these forums. So looking to build a macro I guess. Any ideas how to start? Or has anyone already done this? Thanks for any input and ideas.

Hey Dan,

There is no such animal.

In fact there are no duplicate macros in Keyboard Maestro in a manner of speaking at least.

All macros added to Keyboard Maestro end up with a new ID number, so even otherwise exact duplicates aren't seen that way by Keyboard Maestro.

You can view by name in the “All Macros” smart group, but it's awkward to see duplicated items that may or may not be enabled.

This macro will produce two lists in their own windows in BBEdit.

(I'm using BBEdit, because it's highly scriptable and powerful – even when it reverts from demo mode to lite mode.)

Window 1 (Sorted_Macro_List) is a sorted table of macro names with their ID numbers.

Window 2 (Duplicate_Macro_List) is a sorted list of macro names where there is 1 or more duplicated name.

du -- Keyboard Maestro -- Duplicate Macro Finder v1.00.kmmacros (9.7 KB)

I can write another macro that will take you from the current line in BBEdit to the given macro in the Keyboard Maestro, but I'm done for now.


1 Like

Wow Chris, thank you so much for the effort an your explanation. I'll try this out and let you know if I have any questions. Thank you so much!

1 Like