There is a ‘cached behavior’ in OmniFocus 3 that forces a window always to regenerate to the same settings as it had before closing, which gives me problems when writing my macro.
Is there a setting, maybe via the Terminal, which would allow the user to clear this cache?
What I mean:
Now if I close an OF window, which showed Projects, left Sidebar & Inspector, and later I open a new window with ⌥ ⌘ N, it will show exactly the same: Projects, left Sidebar & Inspector.
… which is probably desired, but in my case, I want to avoid this ‘inheritance’ or cached behaviour.
But similar to one of your other queries, you could probably accomplish what you want with Keyboard Maestro. One idea: you can use an Assert action to test whether certain menu commands are enabled, which could tell you whether the sidebar is visible.
However, to really reset everything you’ll also need to clear out the Saved Application State folder inside Library/Containers/com.omnigroup.OmniFocus3/Data/Library: