• 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: Finder windows: opening in same, closing parent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder windows: opening in same, closing parent


  • Subject: Re: Finder windows: opening in same, closing parent
  • From: Graff <email@hidden>
  • Date: Wed, 21 Apr 2004 11:45:34 -0400

On Apr 21, 2004, at 2:24 AM, Jim Witte wrote:

How can I emulate the Cmd-Opt-Double-Click behavior of the Finder,
You can grab the front window and close it, then you can open the folder which is selected:

Yeah, but this seems less elegant than an 'in same window' clause.. If such a clause were added, 1) Back/Foward behavior in windows would be consistent, 2) window positions would be maintained - though this could be done with a script too (does any OSAX implement a 'lock screen' type command to suppress GUI output temporarily?), and 3) possibly be quicker (one open command instead of an open/close pair - don't know how it's coded)

The command-option-double click doesn't do any of these things that you say. It closes the window and then opens a completely different window. This new window has its own settings as for style, size, and position and it doesn't have a history so you can't go back. My first example script emulated the behavior of the command-option-double click, just as you requested.

However, the second part of my message covers doing this in the same window. This script does pretty much everything you say:
----------
tell application "Finder"
set theFolder to selection
set theWindow to the front window
set target of theWindow to (theFolder as alias)
end tell
----------

This is just a quick example script, my original warnings for it were:

Again, this doesn't check to see if the selection
is a folder, you probably should add that in to be
safe. You probably also want to make sure that
only 1 item is selected or that you only use 1
item if multiple items are selected. If you don't
have just 1 item then the script will fail.

- Ken
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Finder windows: opening in same, closing parent
      • From: Michelle Steiner <email@hidden>
References: 
 >Finder windows: opening in same, closing parent (From: Jim Witte <email@hidden>)
 >Re: Finder windows: opening in same, closing parent (From: Graff <email@hidden>)
 >Re: Finder windows: opening in same, closing parent (From: Jim Witte <email@hidden>)

  • Prev by Date: Re: Create list of lists?
  • Next by Date: Crop with Acrobat 5
  • Previous by thread: Re: Finder windows: opening in same, closing parent
  • Next by thread: Re: Finder windows: opening in same, closing parent
  • Index(es):
    • Date
    • Thread