Example of macro to Edit a Keyboard Maestro macro

Something it can be useful to begin editing a macro programmatically: for example a Switch of Variable Action to be incremented for a new branch in some situations.

Here is a simple example of a macro with editing goal itself :wink: which works even if Keyboard Maestro Editor is not yet running.

-- Alain

DOWNLOAD
Edit a Keyboard Maestro macro.kmmacros (5.2 KB)

Hey Alain,

You can simplify that down to 1 Execute an AppleScript action.

tell application "Keyboard Maestro"
  activate
  editMacro "Generic-Test 01"
end tell

You can also use a Group-Name to edit a group instead of a macro.

-Chris

1 Like

Thanks Chris for your improved elegant solution which works (unsurprisingly) like a charm :smile:

Finally my generic operational solution for internal editing is:
Edit a Keyboard Maestro macro within a macro.kmmacros (2.5 KB)


-- Alain