• 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: Getting the path of a file.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Getting the path of a file. (From: Jeff Shapiro <email@hidden>)

  • Prev by Date: Re: Getting the path of a file.
  • Next by Date: Re: Getting the path of a file.
  • Previous by thread: Re: Getting the path of a file.
  • Next by thread: Re: URL Access Scripting launches Classic
  • Index(es):
    • Date
    • Thread