Launch Omnifocus Perspective with Keyboard Maestro

Launch Omnifocus Perspective with Keyboard Maestro

(kevinjhardman) #1

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.

(Martin) #2

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.

(Wilson Ng) #3

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.

(Wilson Ng) #4

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.