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 > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Restarting Thread Tools Search this Thread Display Modes
If I want to restart my Mac, I hit Restart, and OS X closes down every app except OO. I get a message asking if I want to save changes. If I'm not there to physically hit Yes, then Restart stops.

Is there any way I can set a preference that OO will save upon Restart without my having to hit Yes?
 
Quote:
Originally Posted by rogbar View Post
Is there any way I can set a preference that OO will save upon Restart without my having to hit Yes?
Not as far as I can see, but an alternative might be to initiate the shut-down from a script (which could be launched by the operating system at a given time).

The script could, inter alia, look for OmniOutliner, and, if it is running, loop through any open windows and close them, with a save if needed.
 
A script, which you could add to the Finder script menu, and perhaps assign a keystroke to, might contain code roughly along these lines:

Code:
-- Closes OmniOutliner before Restarting OS X
-- Modified OmniOutliner documents are saved before they are closed.
-- OO documents with names like Untitled, or Untitled 2
-- are saved with filenames built from the current system date

property pAppToClose : "OOut"
property pUnSavedName : "Untitled"

on run
	if AppIsRunning(pAppToClose) then
		tell application id "com.omnigroup.OmniOutlinerPro3"
			set lstDoc to documents
			repeat with oDoc in lstDoc
				tell oDoc
					if modified then
						if name of oDoc contains pUnSavedName then
							set name of oDoc to ((current date) as string) & ".oo3"
						end if
						save
					end if
					close
				end tell
			end repeat
			quit
		end tell
	end if
	
	tell application id "com.apple.finder"
		restart
	end tell
end run

on AppIsRunning(strAppCode)
	tell application id "com.apple.systemevents"
		(creator type of processes) contains strAppCode
	end tell
end AppIsRunning

Last edited by RobTrew; 2010-03-29 at 11:38 PM.. Reason: added .oo3 extension to date-based file name
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie question about repeating and restarting pammm56 OmniFocus 1 for Mac 3 2012-01-01 09:41 AM
Tasks don't always show up until restarting app patgallant OmniFocus for iPhone 8 2009-10-20 05:01 PM
Help w/error message re: growl app? [Resolved by restarting other app.] aderby OmniFocus Extras 2 2009-10-06 02:39 PM


All times are GMT -8. The time now is 05:21 PM.


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