Re: Opening SD's EnclosingFolder
Re: Opening SD's EnclosingFolder
- Subject: Re: Opening SD's EnclosingFolder
- From: Rob Jorgensen <email@hidden>
- Date: Tue, 5 Mar 2002 13:34:10 -0500
On 3/5/02, someone named Gnarlodious asked:
Did someone write a script for Script Debugger's script menu that will open
the enclosing Finder window of the frontmost script?
Thanks
Here's a revised version of my earlier attempt. Due to the recent
threads here regarding nested tells, I revisited the script and
tidied it up a bit. :P
-- Begin Script v2 - watch for line wraps --
tell application "Script Debugger" to set scriptPath to file spec of
front script window
if scriptPath is missing value then
display dialog "The current script hasn't been saved to disk. No
further action will be taken." buttons {"OK"} default button 1 giving
up after 5
error number -128
end if
tell application "Finder" to set folPath to container of scriptPath as text
set folderInfo to info for folPath
if name of folderInfo is not "Desktop Folder" then
tell application "Finder" to open folder folPath
else
display dialog "This script is in the Desktop Folder (it can't be
opened)." buttons {"OK"} default button 1
end if
-- End Script v2 --
I suppose this will hit the list before my first response and confuse
everyone. The list server has been severely delaying my posts lately.
:-(
Later,
--
Rob Jorgensen
http://macscripter.net/ - Your best source for all things AppleScript
_______________________________________________
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.