Since I am working from home for the foreseeable future, it’s stabilised my working environment. This means a little more time for automation! I wrote a Keyboard Maestro macro to help me navigate around OmniFocus (sort of). I’m posting here as it based on AppleScript.
A lot of my work is facilitating workshops and I often have several on the go at one time. I wanted a way to see a list of my active ‘engagements’, select one and then go right to it in OmniFocus.
Here it is:

This first step looks in my “Engagements” folder in OmniFocus and extracts the list of Projects. I couldn’t work out how to use a whose clause to give me only the Projects whose status is active and that’s why I went with the loop and if clause. Any thoughts on this is appreciated!
This returns a list of the active projects separated with commas. The next steps:

Replace the commas with newlines and then prompts me with the list of active projects. Once I’ve selected the project hat is saved into the variable ofSelectedEngagement.
The next step is to get the task id of the project I selected:

The first bit of that script gets the Keyboard Maestro variable into an AppleScript variable. The next bit finds the task id of the project. There is a potential issue here if I have two projects with the same name.
The final step is to open the project in OmniFocus:

This uses the same syntax as what gets created if you choose ‘Copy as Link’ in OmniFocus.
I trigger the above with a button on an Elgato Stream Deck.

