Re: Finder windows: opening in same, closing parent
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.