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 1 for Mac
FAQ Members List Calendar Today's Posts

 
'Home page' preference? Thread Tools Search this Thread Display Modes
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
 
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
 
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).
 
thanks whpalmer4 and JKT

- 2 elegant solutions, many thanks

peter
 
Quote:
Originally Posted by JKT View Post
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).
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
 
Quote:
Originally Posted by whpalmer4 View Post
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
sorry for dumb question, but I couldn;t find a way to run the script, please advise

peter
 
Quote:
Originally Posted by peterlemer View Post
sorry for dumb question, but I couldn;t find a way to run the script, please advise

peter
See here for instructions on how to install and use scripts in OmniFocus:

http://forums.omnigroup.com/showthread.php?t=7453
 
Quote:
Originally Posted by whpalmer4 View Post
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
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
 
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!
 
Quote:
Originally Posted by peterlemer View Post
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?
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 :-)
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't set Home Page to a Blank Page Gopher OmniWeb General 2 2011-09-25 11:31 AM
How to set the home page? Omorfos OmniWeb General 5 2011-08-11 09:31 AM
Launching OmniWeb brings up recent page, not designated Home Page jwthomas OmniWeb General 14 2008-05-29 09:55 PM
Launching OmniWeb brings up recent page, not designated Home Page jwthomas OmniWeb Bug Reports 0 2008-05-26 11:36 AM
Home page search box rhywun OmniWeb Feature Requests 2 2007-09-11 03:29 PM


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


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