"Any window title contains" condition not working for inactive tabs

I'm finding that the "any window title contains" condition doesn't always work when using tabs, at least not in OmniFocus. What I want is to trigger an OmniFocus perspective if it's not open, or go to the corresponding window if it's already open (including as a tab) rather than making a new one. This sometimes does what I want but not consistently — often it will use the Perspectives command even if the window I want already exists. Is there a better approach?
3) Perspective: Forecast.kmmacros (5.0 KB)

Did you get this to work? I have the same problem - macro does not trigger if Omnifocus tab changes, which does change the focused window title.

I don’t think I’ve revisited it since writing that. Just tried it again with a tab open but not frontmost for the Forecast perspective, and instead of going to that tab it changed the tab that was frontmost to Forecast, so now I’ve got two tabs that both show Forecast. :frowning:

I think what’s needed is an equivalent to the “try” statement in AppleScript.

Got it. Thanks for the quick reply.

Might make sense for me to start a new thread. I am trying to select “Show all notes” menu option if application Omnifocus is active and if Window title changes.

As of now, I am got around it by running the macro every one minute when OF is running, and if “Show all notes” is available in the menu, then to select it. “Show all notes” changes to “Hide all notes” if notes are already showing.