The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Change the perspective from Applescript? (http://forums.omnigroup.com/showthread.php?t=11502)

Tiny Clanger 2009-03-05 01:15 AM

Change the perspective from Applescript?
 
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[/CODE]

There is no error shown. Where am I going wrong?

Thanks

Craig 2009-03-05 06:26 AM

Do you need "end tells" for all those "tells"?

Tiny Clanger 2009-03-05 07:38 AM

[QUOTE=Craig;56155]Do you need "end tells" for all those "tells"?[/QUOTE]

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 :)

gfloro 2009-03-07 06:38 AM

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..

Tiny Clanger 2009-03-10 04:16 AM

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 :)

Greg Jones 2009-03-10 05:07 AM

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.


All times are GMT -8. The time now is 07:33 AM.

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