PDA

View Full Version : Word won't stop opening all previous windows




Laodah
Apr 7, 2013, 12:04 PM
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
Apr 8, 2013, 10:03 AM
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
Apr 8, 2013, 10:54 PM
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
Apr 9, 2013, 11:58 AM
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/showthread.php?t=1562191&highlight=disable+state

Laodah
Apr 9, 2013, 03:06 PM
Thanks for the tip, Bill.

Mr. Retrofire
Apr 10, 2013, 07:26 AM
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 (http://www.macupdate.com/app/mac/40013/restoremenot) preference pane?

Krazy Bill
Apr 10, 2013, 09:30 AM
Do you mean the RestoreMeNot (http://www.macupdate.com/app/mac/40013/restoremenot) preference pane?

Yes, that's it. No wonder googling for "NoRestore" go me nowhere. :)

benwiggy
Apr 10, 2013, 12:20 PM
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.

-- 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
Apr 10, 2013, 12:26 PM
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
Apr 10, 2013, 01:15 PM
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
Apr 10, 2013, 02:55 PM
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
Apr 10, 2013, 03:17 PM
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
Apr 10, 2013, 06:28 PM
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
Apr 10, 2013, 10:19 PM
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?"