Scripting Maestro: Inserting an Action

Hi Forum,

I’m trying to create an applescript to quickly insert a Pause-Action into the currently selected Macro. Unfortunately, my attempts aren’t very successful… :weary:

Here’s my (faulty) code:

tell application id “com.stairways.keyboardmaestro.editor” to make new action with properties {xml:"< dict>
MacroActionType
Pause
Time
0.2
TimeOutAbortsMacro

< /dict>"}

Careful though: I inserted two spaces in both of the < dict > lines otherwise the forum picks it up as xml commands.

Very thankful for any suggestions,
Happy holidays!
A. P.

You're missing the at parameter which expects a location specifier type. E.g.: end of macros of macro id "EFGHD-DHHAK.."

Perhaps this macro I made helps.

Create pause action in selected macro.kmmacros (3.0 KB)

1 Like

Scripts are powerful and I often use them, but for this use case I find this great macro by @DanThomas to be better and more functional:
###MACRO: [KMFAM] Favorite Actions and Macros

Dan's KMFAM system will allow you to not only easily insert Actions, but to first customize them before adding to your KMFAM list. I use it many times a day.

1 Like

Wow, I asked for a coin; you gave me a treasure chest!

Thank you!

1 Like