The Omni Group Forums

The Omni Group Forums (
-   OmniFocus Extras (
-   -   Change the perspective from Applescript? (

Tiny Clanger 2009-03-05 12: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"
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?


Craig 2009-03-05 05:26 AM

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

Tiny Clanger 2009-03-05 06: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 05: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 03: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 04: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 05:33 PM.

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