Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > OS X > OS X 10.8 Mountain Lion

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 7, 2013, 12:04 PM   #1
Laodah
macrumors newbie
 
Join Date: Feb 2013
Word won't stop opening all previous windows

I'm running Word 2011 in Mountain Lion 10.8.2. I've clicked the "close windows" box in General Prefs and unclicked the "annoy me to death" box in the shutdown warning dialogue. I've trolled the Word prefs for some box to unclick there, but haven't found it. I've thrown out the MS Saved Application State folder from /Library. Word is still reopening on launch all documents that were open when I shut down the computer.

What am I missing?

Thanks.
Laodah is offline   0 Reply With Quote
Old Apr 8, 2013, 10:03 AM   #2
benwiggy
macrumors 68020
 
Join Date: Jun 2012
For better or worse, Resume is here to stay, and most attempts to derail it don't always work, despite the myriad of webpages given over to it.

The simplest method of stopping documents from re-opening is to swap the keystrokes for "Quit" (Command Q) and "Quit and Close Windows" (Command alt Q). Then when you hit Command Q, your apps will quit and close all windows.

Of course, if you don't quit the app manually, it will come back on restart. The best method of combating this is an AppleScript that runs at shutdown which closes all windows of open apps and quits them before shutting down.
I'm putting something together and will post it here later if I get a moment.
__________________
2012 MacMini, 2.6GHz i7, 16Gb RAM, Fusion Drive | 2012 MacBook Pro, 16Gb RAM, 480 Gb SSD |
2009 MacBook | 2006 iMac | 2003 G3 iBook | Beige G3 | PowerMac 7600 | Mac IIsi |
benwiggy is offline   0 Reply With Quote
Old Apr 8, 2013, 10:54 PM   #3
Laodah
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
Sigh. I hate Resume. And I haven't found many Maquistas online that don't. I'll be looking for your script post; this thing is driving me nuts.
Laodah is offline   0 Reply With Quote
Old Apr 9, 2013, 11:58 AM   #4
Krazy Bill
Banned
 
Join Date: Dec 2011
In my Lion days there was a beta app called "noresume" but I can't find it anywhere. It allowed you to selectively chose which applications to ignore the resume/restore feature.

I stopped using it when I just disabled my state folder for all applications - basically neutering this crap for all applications.

http://forums.macrumors.com/showthre...=disable+state
Krazy Bill is offline   0 Reply With Quote
Old Apr 9, 2013, 03:06 PM   #5
Laodah
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
Thanks for the tip, Bill.

Last edited by Laodah; Apr 9, 2013 at 03:07 PM. Reason: Question already answered.
Laodah is offline   0 Reply With Quote
Old Apr 10, 2013, 07:26 AM   #6
Mr. Retrofire
macrumors 601
 
Mr. Retrofire's Avatar
 
Join Date: Mar 2010
Location: www.emiliana.cl
Quote:
Originally Posted by Krazy Bill View Post
In my Lion days there was a beta app called "noresume" but I can't find it anywhere. It allowed you to selectively chose which applications to ignore the resume/restore feature.
Do you mean the RestoreMeNot preference pane?
__________________

“Only the dead have seen the end of the war.”
-- Plato --
Mr. Retrofire is offline   0 Reply With Quote
Old Apr 10, 2013, 09:30 AM   #7
Krazy Bill
Banned
 
Join Date: Dec 2011
Quote:
Originally Posted by Mr. Retrofire View Post
Do you mean the RestoreMeNot preference pane?
Yes, that's it. No wonder googling for "NoRestore" go me nowhere.
Krazy Bill is offline   0 Reply With Quote
Old Apr 10, 2013, 12:20 PM   #8
benwiggy
macrumors 68020
 
Join Date: Jun 2012
Here's what I've cobbled together from a couple of different scripts.
It will close the windows and quit every app. It also lets you keep a "white list" of apps whose windows you don't want to close (funny, Resume has been default in Finder for decades ); and of apps you want to quit, i.e. which won't launch again at restart.

Code:
-- Script to close all windows and quit all apps, then shutdown
-- Based on scripts by Alex Layne and others

tell application "System Events"
	set the visible of every process to true
	
	set quit_white_list to {"Finder"}
	-- Any apps in this list will not be quit.
	
	set close_white_list to {"Finder"}
	-- Any apps in this list will not have their windows closed.
	
	try
		set process_list to the name of every process whose visible is true
		
		repeat with i from 1 to (number of items in process_list)
			set this_process to item i of the process_list
			tell my application this_process
				if this_process is not in close_white_list then close every window
				if this_process is not in quit_white_list then quit
			end tell
		end repeat
		
	on error
		tell the current application to display dialog "An error has occurred!" & return & "This script will now quit" buttons {"Quit"} default button 1 with icon 0
	end try
	shut down
	
end tell
Running a script at Shutdown is trickier than I assumed, and there's no guarantee that the script will run before the OS has "ha ha quit" some or all apps.
So you're best of getting in the habit of launching this instead of clicking shutdown.
__________________
2012 MacMini, 2.6GHz i7, 16Gb RAM, Fusion Drive | 2012 MacBook Pro, 16Gb RAM, 480 Gb SSD |
2009 MacBook | 2006 iMac | 2003 G3 iBook | Beige G3 | PowerMac 7600 | Mac IIsi |
benwiggy is offline   0 Reply With Quote
Old Apr 10, 2013, 12:26 PM   #9
Laodah
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
I may need to clarify my request: Word isn't opening on its own at computer restart. (Unclicking Resume-whatever stopped that.) What's happening is, when I launch Word after restart, it automatically opens all windows that were open when I shut down the computer. This only happens when I shut down the computer without quitting Word first. Which I usually do.

I used to have the same problem with TextWrangler, but they soon posted an update that eliminated this bug.
Laodah is offline   0 Reply With Quote
Old Apr 10, 2013, 01:15 PM   #10
Laodah
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
By the way, changing the permissions for the Saved Application State folder to "Read Only" seems to have worked! I just shut down with three Word windows open and restarted, and got no windows when I relaunched Word! Thanks again, Bill!
Laodah is offline   0 Reply With Quote
Old Apr 10, 2013, 02:55 PM   #11
printz
macrumors regular
 
Join Date: Dec 2012
WTF is with the Resume hate? Normally I have 20 applications open, and sometimes I need to shut down OSX. It's really convenient to have these applications reopen in the same state when I restart. It happens quickly too, because I use a SSD.

HINT: press Command+Option+W to close all windows before quitting the application! if you don't want them to come back next time.
printz is offline   0 Reply With Quote
Old Apr 10, 2013, 03:17 PM   #12
talmy
macrumors 68040
 
talmy's Avatar
 
Join Date: Oct 2009
Location: Oregon
Get out of the habit of using Cmd-Q to quit applications and use Cmd-W to close the window instead. It won't "resume" and you get the bonus of instant start up of the application since you haven't shut it down. Lion and Mountain Lion are designed to be used this way.
__________________
27" i7 iMac, 15" MacBook Pro, Mac mini with Mavericks Server, 5 other Macs and an Apple TV.
talmy is offline   0 Reply With Quote
Old Apr 10, 2013, 06:28 PM   #13
Krazy Bill
Banned
 
Join Date: Dec 2011
Quote:
Originally Posted by Laodah View Post
By the way, changing the permissions for the Saved Application State folder to "Read Only" seems to have worked! I just shut down with three Word windows open and restarted, and got no windows when I relaunched Word! Thanks again, Bill!
You are welcome. Just so you know, (and I'm sure you've learned by now), that change will affect every application, not just Word.

Quote:
Originally Posted by printz View Post
WTF is with the Resume hate? Normally I have 20 applications open, and sometimes I need to shut down OSX. It's really convenient to have these applications reopen in the same state when I restart. It happens quickly too, because I use a SSD.
Well, some of us just aren't you I guess.
Krazy Bill is offline   0 Reply With Quote
Old Apr 10, 2013, 10:19 PM   #14
Laodah
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
It's all good, Bill. To begin with, no other of my apps needs the intervention; they all turned off when asked. Word was the only one that wouldn't oblige. And I hate that "Resume" feature anyway. 'Bout the only time I'd welcome it is if I got a bomb and it offered it on restart, the way a browser says, "You shut down awful fast last time; you wanna open all the same windows you had open?"
Laodah is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X > OS X 10.8 Mountain Lion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:15 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC