Re: Remember Finder windows left open at shutdown
Re: Remember Finder windows left open at shutdown
- Subject: Re: Remember Finder windows left open at shutdown
- From: Axel Luttgens <email@hidden>
- Date: Mon, 23 Aug 2010 16:52:32 +0200
Le 22 août 2010 à 21:32:24, Barry Fass-Holmes a écrit :
> Hi Axel,
>
> Thank you very much for taking time to respond to my posting and for the script you wrote.
>
> I compiled and ran your script for storing Finder windows' bounds. The attached screen capture shows AppleScript Editor's result. Is this what you expected?
Hello Barry,
Yes, provided there are no Finder windows opened at the time the script is run, you should get the result displayed in your screen capture:
{{}, {}}
With two Finder windows open, here on /System and on /Library, the result should look like:
{{folder "System" of startup disk of application "Finder", folder "Library" of startup disk of application "Finder"}, {{512, 203, 1357, 748}, {501, 59, 1346, 604}}}
> Actually, my goal simply is to get the folder names of the ~14 Finder windows that I leave open upon shutdown.
>
> I want to "remember" which folders were open at the time of shutdown, so that on the intermittent occasions when the Finder "forgets" to reopen them, I can reopen them with a script.
Perhaps could it be worth to investigate why the Finder sometimes forgets its window state in your case.
Unless I'm wrong, the Finder saves that information into its preference file, ~/Library/Preferences/com.apple.finder.plist, under the BrowserWindowState key; this may be read by issuing following shell command:
defaults read com.apple.finder BrowserWindowState
Now, writes to that preference file do not happen immediately; I guess this is wanted behavior: better collapse various changes than continuously write to a file.
On the other hand, it should be expected that, if the Finder has the opportunity to quit orderly and cleanly, any yet unwritten change would anyway be saved; unless there's some bug at work...
Could you briefly describe your environment (for example, automatic login when booting the machine?) and how you usually shut down your machine (for example, logout first then shutdown, or immediate shutdown?)?
And possibly infer some pattern that leads to such an amnesia?
When those losses happen, is it for all windows or only for a subset?
No error messages sent to the log system, as seen through "All messages" in Console.app, when the problem occurs?
More generally, perhaps do other people experience such losses too?
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden