What is the easiest way to change a text string for ALL the macros in a macro group. e.g. COC to OC

What is the easiest way to change a text string for ALL the macros in ONE macro group. e.g. COC to OC.
This includes display messages, log texts, sub macro names
i.e. a global find and replace.

1 Like

Export Macro Group, multifile S'n'R in BBEdit or similar, Import edited Macro Group?

But there's a lot that can go wrong here, even if you are doing a case-sensitive replacement... So make sure you have a good backup and be prepared to have a few tries to get it right.

@DanThomas's KMET macro set (Keyboard Maestro Edit as Text) allows you to export an entire group as JSON or XML and by default opens the text in BBEdit. I've used it multiple times for just this kind of thing.

It helps if you have some familiarity with either JSON or XML, but if you have done any coding at all, in any language, you can probably find your way around. After getting familiar with the file format (e.g., the JSON seems to always have the name of the macro as the last field in the group) do a global search with an individually confirmed replacement so you can ensure that nothing gets accidentally changed that shouldn't be.

If you use a Regular Expression for your search, you can specify beginning of word and end of word to delimit your search string, which should help avoid spurious matches.