The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   'Home page' preference? (http://forums.omnigroup.com/showthread.php?t=10877)

peterlemer 2008-12-19 01:10 AM

'Home page' preference?
 
Is there a way to ensure that when I launch OF it always starts with a preferred configuration of windows, regardless of the previous state?

eg. I'd like OF to always start with only one window, and that one is my 'All' Perspective.

I realise I can do this by enabling that configuration before I quit, and there are many times when I simply shut my computer down with several apps running - I don't want to visit each one to see that it's shipshape for next time.

peter

whpalmer4 2008-12-19 01:53 PM

The included Applescript will close all but the front window and apply the desired perspective to the front window. You can use it with the application running or not, as the application will be launched if it isn't running.

[code]
property DefaultPerspective : "All"

tell application "OmniFocus"
set mainWindow to front window
set frontID to id of mainWindow
set background to (every window whose id is not frontID)
repeat with thisWindow in background
close thisWindow
end repeat
set perspective name of mainWindow to DefaultPerspective
end tell
[/code]

JKT 2008-12-20 10:56 PM

Another alternative way - create a perspective for your default state that you want to launch in, then put that Perspective in your Dock and use it to launch OmniFocus (the Perspectives are stored in the Application Support folder for OmniFocus, in your Library folder).

peterlemer 2008-12-31 08:32 AM

thanks whpalmer4 and JKT

- 2 elegant solutions, many thanks

peter

peterlemer 2009-02-23 07:27 AM

[QUOTE=JKT;52690]Another alternative way - create a perspective for your default state that you want to launch in, then put that Perspective in your Dock and use it to launch OmniFocus (the Perspectives are stored in the Application Support folder for OmniFocus, in your Library folder).[/QUOTE]

it sort of works, but the startup view will include windows that were open before the previous quit, and the window itself is not in fact the original perspective; rather, it seems to be the state of the original perspective as it was last on last quit, rather than the pure snapshot.

It seems generally that if I want to search everywhere, I need my 'All' perspective showing in its raw state, and most of the time it isn't on tap so I have to call it up, which takes about 3 seconds.

peter

peterlemer 2009-02-23 07:27 AM

[QUOTE=whpalmer4;52630]The included Applescript will close all but the front window and apply the desired perspective to the front window. You can use it with the application running or not, as the application will be launched if it isn't running.

[code]
property DefaultPerspective : "All"

tell application "OmniFocus"
set mainWindow to front window
set frontID to id of mainWindow
set background to (every window whose id is not frontID)
repeat with thisWindow in background
close thisWindow
end repeat
set perspective name of mainWindow to DefaultPerspective
end tell
[/code][/QUOTE]

sorry for dumb question, but I couldn;t find a way to run the script, please advise

peter

JKT 2009-02-23 07:35 AM

[QUOTE=peterlemer;55604]sorry for dumb question, but I couldn;t find a way to run the script, please advise

peter[/QUOTE]
See here for instructions on how to install and use scripts in OmniFocus:

[url]http://forums.omnigroup.com/showthread.php?t=7453[/url]

peterlemer 2009-04-13 04:42 AM

[QUOTE=whpalmer4;52630]The included Applescript will close all but the front window and apply the desired perspective to the front window. You can use it with the application running or not, as the application will be launched if it isn't running.

[code]
property DefaultPerspective : "All"

tell application "OmniFocus"
set mainWindow to front window
set frontID to id of mainWindow
set background to (every window whose id is not frontID)
repeat with thisWindow in background
close thisWindow
end repeat
set perspective name of mainWindow to DefaultPerspective
end tell
[/code][/QUOTE]

OK, I have the script running, but I'm not quite there yet.
How does the script know which is the desired perspective ( ie. "All") as the perspective title isn't mentioned in the script?

peter

gerben 2009-04-13 06:19 AM

You have to replace the text "All" with the name of the perspective you would like to open OF with; "All' is most likely a custom whpalmer4 perspective, so it's not in your perspectives folder.

Great script by the way!

whpalmer4 2009-04-13 06:19 AM

[QUOTE=peterlemer;58466]OK, I have the script running, but I'm not quite there yet.
How does the script know which is the desired perspective ( ie. "All") as the perspective title isn't mentioned in the script?
[/QUOTE]

You edit the script to put your desired preference there in place of "All"...

A word of caution: the script will not work properly if your front OmniFocus window is the Preferences window. All the other OF windows will be closed, but it won't open one for your perspective, and the Preferences window will be confused and uncooperative when you ask it to adopt your desired perspective :-)


All times are GMT -8. The time now is 10:37 AM.

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