The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Today's Posts

 
Change the perspective from Applescript? Thread Tools Search this Thread Display Modes
I'm trying to write an Applescript to run daily at 8am, which will bring OmniFocus to the front with the Due Soon perspective showing. However, this script activates OF but does not change the displayed perspective:

Code:
tell application "OmniFocus"
	activate
	tell the default document to tell the front document window to set the perspective name to "Due Soon"
end tell
There is no error shown. Where am I going wrong?

Thanks
 
Do you need "end tells" for all those "tells"?
 
Quote:
Originally Posted by Craig View Post
Do you need "end tells" for all those "tells"?
Shouldn't do for a single-line statement: that's only necessary on multiple lines.

I've tried it in the other form, and it still doesn't work, so that's not it in any case :)
 
It doesn't seem to work with the "canned" perspectives, but DOES work with my custom perspectives. I'm no AppleScripter, but I'll keep digging..
 
Thanks — I've cloned the Due Soon perspective and called it Imminent, and the script invokes that just fine.

But what a strange way for OF to behave :)
 
I'm not a programmer, but I'd suspect that the script does not work with the built-in views because they are internally different from the Perspectives that you can create or clone from a built-in view.
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Change selected context, in perspective ? Tado OmniFocus 1 for Mac 1 2013-04-05 07:10 AM
Applescript to change the Project of a task? Kha OmniFocus Extras 2 2011-12-19 02:10 PM
Change order in Due perspective? rogbar OmniFocus 1 for Mac 3 2010-04-14 03:02 PM
Spontaneous change of perspective sawxray OmniFocus 1 for Mac 6 2009-04-23 09:16 AM
AppleScript to change task dates aleding OmniFocus 1 for Mac 1 2008-05-11 02:16 PM


All times are GMT -8. The time now is 10:05 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.