Re: Getting the path of a file.
Re: Getting the path of a file.
- Subject: Re: Getting the path of a file.
- From: Gnarlodious <email@hidden>
- Date: Sat, 20 Apr 2002 13:44:21 -0600
Entity Jeff Shapiro spoke thus:
>
OK, I give up. How can I get the path of a file dropped on a script?
This script puts the alias path of the file on the clipboard:
on open dropped
tell application "Finder"
try
set x to dropped as alias list
on error
set x to dropped as alias
end try
end tell
set x to {} & x
set c to count of x's items
if c = 0 then
set x to "{}"
else if c = 1 then
set x to "\"" & x & "\""
else
set {oldTIDs, text item delimiters} to {text item delimiters, "\",
\""}
set {x, text item delimiters} to {x as string, oldTIDs}
set x to "{\"" & x & "\"}"
end if
set the clipboard to x
end open
Hope that makes sense...
Rachel
http://www.Spectrumology.com
_______________________________________________
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.