Here is a semi functional macro I whipped up to quickly add and remove text from macro names. It's missing a ton of functionality but it does what I needed it to do. I'll post an updated version when I make improvements.
- Keyboard Maestro 8
- Smile companion osax
As @JMichaelTX always says:
Carefully review the Release Notes and the Macro Actions
Make sure you understand what the Macro will do.
You are responsible for running the Macro, not me.
Download:[KM] Bulk Rename Macros with Search and Replace.kmmacros (30.5 KB)
The relevant AppleScript:
use AppleScript version "2.4" -- Yosemite (10.10) or later use scripting additions set inst to system attribute "KMINSTANCE" tell application "Keyboard Maestro Engine" set searchTerm to getvariable "Local__Search" instance inst set replaceTerm to getvariable "Local__Replace" instance inst end tell tell application "Keyboard Maestro" set macroList to every macro whose selected is true repeat with aMacro in macroList set oldName to name of aMacro set newName to change searchTerm into replaceTerm in oldName with regexp without case sensitive set name of aMacro to newName end repeat end tell