Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Laodah

macrumors newbie
Original poster
Feb 4, 2013
19
0
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.
 

benwiggy

macrumors 68020
Jun 15, 2012
2,473
289
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.
 

Laodah

macrumors newbie
Original poster
Feb 4, 2013
19
0
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.
 

Krazy Bill

macrumors 68030
Dec 21, 2011
2,985
3
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.

https://forums.macrumors.com/threads/1562191/
 

benwiggy

macrumors 68020
Jun 15, 2012
2,473
289
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 :p); 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.
 

Laodah

macrumors newbie
Original poster
Feb 4, 2013
19
0
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

macrumors newbie
Original poster
Feb 4, 2013
19
0
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!
 

printz

macrumors regular
Dec 23, 2012
218
0
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.
 

talmy

macrumors 601
Oct 26, 2009
4,727
337
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.
 

Krazy Bill

macrumors 68030
Dec 21, 2011
2,985
3
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.

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.
 

Laodah

macrumors newbie
Original poster
Feb 4, 2013
19
0
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?"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.