How to use setMacroEnable (in applescript dictionary)

Hi there, I would like to disable and then later re-enable a KM macro from within an applescript that I have. I've found setMacroEnable, but can't figure out how to get it to work! I've tried:
setMacroEnable "245C48DF-ACEC-4031-9B83-7C720D37ED73", false
setMacroEnable {"245C48DF-ACEC-4031-9B83-7C720D37ED73", false}
setMacroEnable "245C48DF-ACEC-4031-9B83-7C720D37ED73" to false
setMacroEnable "245C48DF-ACEC-4031-9B83-7C720D37ED73" with false

They all have some sort of error, and I can't find anything in the forum that shows a working invocation of this command. I've done lots of scripting in the past, but this one has me totally stumped.


Did a quick search of this forum and found Feature Request: Enable|Disable|Toggle Macro - Variable that shows how to call it in AppleScript.

Check out this section of the Wiki: Scripting the Keyboard Maestro editor

Awesome, thank you both :slight_smile: So, not "with disable" (which I had also tried, but forgot to list) but "without enable"!!! So obvious when you see it.....

1 Like

Yeah, that's usually the case, right? :smile:

1 Like

Oh, yes indeed! :smile:

1 Like