Re: Opening SD's EnclosingFolder
Re: Opening SD's EnclosingFolder
- Subject: Re: Opening SD's EnclosingFolder
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 05 Mar 2002 09:34:45 -0800
On 3/5/02 6:58 AM, "Gnarlodious" <email@hidden> wrote:
>
Did someone write a script for Script Debugger's script menu that will open
>
the enclosing Finder window of the frontmost script?
>
Thanks
>
That's easy enough, if you look in SD's Dictionary: you have to set the
Preference to enable SD' s Dictionary first. Then, in 'document', you'll
find the 'file spec' property:
set fileSpec to file spec of window 1
tell application "Finder"
activate
open container of fileSpec
end tell
Or you could get a little fancier:
try
set fileSpec to file spec of window 1
on error
beep
display dialog "The front window is not a saved script." with icon 0
return
end try
tell application "Finder"
activate
open container of fileSpec
select {fileSpec}
end tell
--
Paul Berkowitz
_______________________________________________
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.