Mass Adding Actions to Macros in a Named Macro Group

Hey @forums2012,

Mass editing of macros is not exactly simple.

I've added a scary warning to the appended macro, but the worst thing that might happen is that you'll have an action added to the top of some macros where you didn't really want it.

Keyboard Maestro's undo function should be more than a match for that problem, although it's always a good idea to have a fresh backup before making mass edits.

Create a test group and give it a suitable name.

Populate the test group with 4 or 5 test macros.

Change the variable targetGroupName in the macro to reflect that name.

Run the macro as-is to see how it works.

Then:

Create the action you want to mass add to your group and make any customizations needed.

Copy it as XML.

Paste into the actionXML Set Variable to Text action.

Edit it down to the <dict>...</dict> level you see in the example action XML.

In the AppleScript action you can change this:

end repeat

To this:

return
end repeat

And that will stop the macro at one iteration for testing.

If all looks good with the inserted action then remove the return line and let the macro go-to-town.

-Chris


Download ⇢ Mass Insert Action at Top of Macros of Designated Group v1.00.kmmacros (9.5 KB)

2 Likes