I created two macros in Keyboard Maestro to trigger the View/Expand All and View/Collapse All menu items.
The macros work - if I hit the hotkeys, the macros will expand or collapse all items in OF.
But I want to get these commands on my toolbar, so I took the Apple Scripts created by those macros, moved them into the OF4 scripts folder, and then went into View/Customize Toolbar, and there they were, ready to be dragged onto the toolbar. So I dragged them onto the toolbar, but when I clicked on them, I got this message:
“The operation couldn’t be completed. /Users/xxx/Library/Application Scripts/com.omnigroup.OmniFocus4/OF-CollapseAll.scpt: execution error: Not authorized to send Apple events to Keyboard Maestro Engine. (-1743)”
As I said, the macros work as macros triggered by hotkeys, but the scripts won’t work, and therefore I can’t get these two commands in my toolbar.
I’ve gone into System Settings/Privacy and Security and made sure that KeyboardMaestro has permissions everywhere it appears they need to be, but still I get this error message.
Any ideas as to what I need to do to allow a script in OF to trigger these KM macros?