The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   How I save a perspective with AppleScript? (http://forums.omnigroup.com/showthread.php?t=23776)

kroger 2012-03-23 10:29 PM

How I save a perspective with AppleScript?
 
Hi,

I want to save a perspective with my (focused) active projects. How can I save a perspective with AppleScript? I got as far as focusing my active projects:

[CODE]
tell application "OmniFocus"
set oDoc to default document
tell default document
set active_projects to flattened projects where its status is active
tell front document window
set perspective name to "Active Projects"
set focus of front document window of oDoc to active_projects
-- HERE--> save perspective name to "Project List"
end tell
end tell
end tell
[/CODE]

whpalmer4 2012-03-23 10:53 PM

I don't believe you can directly create a perspective from Applescript, except by using GUI scripting, where you essentially tell the System Events process which menu items to select, buttons to click, etc.

What are you trying to do? Not sure I understand why you would want a perspective that focuses on your active projects — you could just make one that uses the sidebar filter to select only active projects and get the same effect, no? Is there something I'm missing, besides sleep? :-)

kroger 2012-03-23 10:56 PM

[QUOTE=whpalmer4;108751]I don't believe you can directly create a perspective from Applescript, except by using GUI scripting, where you essentially tell the System Events process which menu items to select, buttons to click, etc.

What are you trying to do? Not sure I understand why you would want a perspective that focuses on your active projects — you could just make one that uses the sidebar filter to select only active projects and get the same effect, no? Is there something I'm missing, besides sleep? :-)[/QUOTE]

Thanks, now I'm trying to use "click menu" to do this.

Yes, you can use the sidebar filter, but since I use projects inside folders, it'll show the folders as well. I want to have a simple list of projects.


All times are GMT -8. The time now is 11:24 AM.

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