• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Remember Finder windows left open at shutdown
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Remember Finder windows left open at shutdown (From: Barry Fass-Holmes <email@hidden>)
 >Re: Remember Finder windows left open at shutdown (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Remember Finder windows left open at shutdown
  • Next by Date: Re: Puzzle Of the Day
  • Previous by thread: Re: Remember Finder windows left open at shutdown
  • Next by thread: Re: Remember Finder windows left open at shutdown
  • Index(es):
    • Date
    • Thread