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: "email@hidden" <email@hidden>
- Date: Fri, 20 Aug 2010 22:41:03 -0700
Here's a version that's almost there.
When you run the first time, it remembers the positions of all windows then closes them.
When run the second time it tries to open all the windows it closed.
You should be able to save this as an applet and set it to run at startup, and run it before you shut down.
HTH,
ES
property windowInfo : {}
property openOrClose : ""
if openOrClose is "Open" then
set openOrClose to "Close"
tell application "Finder"
activate
repeat with thisWindow in windowInfo
set {windowALias, windowBounds, windowView} to thisWindow
try
open windowALias
set the bounds of window 1 to windowBounds
set the current view of window 1 to windowView
end try
end repeat
end tell
else
set openOrClose to "Open"
tell application "Finder"
activate
set allWindows to properties of every window
set windowInfo to {}
repeat with thisWindow in allWindows
try
set windowALias to target of thisWindow as alias
set windowBounds to bounds of thisWindow
set windowView to current view of thisWindow
set the end of windowInfo to {windowALias, windowBounds, windowView}
end try
end repeat
close every window
end tell
end if
_______________________________________________
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