I use this script during my reviews, and a few times throughout the day.
Sometimes, I closed the last window of OmniFocus, and the script won't work.
Here is an improved version that should take care of this.
Code:
tell application "OmniFocus"
tell default document
if number of document window is 0 then
make new document window with properties {bounds:{0, 0, 500, 500}}
end if
end tell
tell front document window of default document
set selected view mode identifier to "project"
tell sidebar to select inbox
end tell
end tell
Thank you Tim for the original code.