Launch Omnifocus Perspective with Keyboard Maestro

I’d like to create a Keyboard Maestro script to launch Omnifocus and jump right to my morning routine. I would also like to turn off the side bar and inspector (to remove all distractions). Here’s the script I created:

It launches Omnifocus but I get this error:

Macro Cancelled
Select Menu Item failed to find target menu bar for Perspective->Morning Routine. Macro “Open Omnifocus Morning Routine” cancelled (while executing Select "Morning Routine: in the Menu “Perspectives” in Omnifocus).

How can I fix this error?

Also, is there a better way to script turning off the side bar and inspector? Since these menu item change based on whether these items are visible the key command could make them visible when I want them hidden.

Thank you in advance.

Add a pause after the command to open omnifocus. Most KM issues can be resolved by allowing a pause or 0.3-5.0 seconds in my experience.


yes, sometimes KM needs to wait for the computer to catch up. adding a pause for a second or two helps. I also have KM pause until a menu item is enabled. Then I can proceed.

1 Like

I usually tell KM to select the command but then change the gear settings to ignore any failures and continue on with the rest of the macro.