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:
Also, is there a better way to script a menu item that toggles. I want the script to turn off the side bar and inspector in Omnifocus but the menu command changes based on whether these items are visible resulting in the script showing these items rather than turning them on.
Ooops... @eurobubba. I thought it worked but the OmniFocus window is just opening up in the same perspective and screen location as when it was last left open. The macro also continues to run and I need to cancel it using the menu. Here's what I have:
To switch to a perspective, I use the Open URL command like this.
It is URL-encoded. Make sure to keep the casing exactly the same.
House is different from house.
You'll also have to convert characters that are not alphabet letters and numbers. A space would be converted to %20. So my "Big Rocks" perspective URL would be
Thank you @Wilson_Ng. The URL worked well. I am trying to open up other files and applications in the same script then place their windows in certain locations. Here's the script:
Another question @Wilson_Ng: can I use a Macro to always hide the OF Sidebar and Inspector? Unfortunately using the KM "Show or Select Menu Item" action doesn't work because the OF Show/Hide Sidebar (or Inspector) menu item changes based on its current state.
what happens if you change the setting in move and resize window?
Instead of "the front window", try "the window with title" and type in the name of your Pages document?
I don't know if it's necessary but maybe have a conditional to pause until Window "XXX" exists and then proceed to resize?
I might be overdoing it but when I manipulate windows during debugging, I throw in the "active application" to bring it to the forefront. It helps me to see if the macro is doing what I want it to do.
I've got another one: I'd like create a Macro to go to my Projects perspective with all of the folders collapsed. I can't figure out a way to collapse the entire Project list in KM since I need to first select a project name before Collapse All shows up in the OF View menu. Does that make sense?