View Single Post
I'm having an issue with OmniFocus's behavior after running an Applescript. Here's what happens to me on multiple machines:

1) Open an Omnifocus window. Close it with Command-W or the red button. Note that clicking on the dock icon brings your Omnifocus window back to the foreground.

2) Execute the following Applescript with the Omnifocus window closed. This is the simplest Applescript that I can reproduce the problem with:

Code:
tell application "OmniFocus"
	tell the default document to tell the front document window
		set perspective name to "Inbox"
	end tell
end tell
3) Click on the Omnifocus icon in the dock. The document no longer opens and I need to open a new window with File->New Window or Command-Option-N to use the app again. Quitting the application and relaunching fixes the behavior until the script is run again.

Am I doing something wrong in my Applescript, or is this a bug in Omnifocus? Is there any sort of workaround? I want to be able to use this to periodically export data, so running it with the window open isn't always possible.