Re: "Paths to Clipboard" droplet
Re: "Paths to Clipboard" droplet
- Subject: Re: "Paths to Clipboard" droplet
- From: Bryan <email@hidden>
- Date: Mon, 23 Jul 2001 16:11:08 -0400
- Organization: Apex Radiology
The XCMD OSAX by Edward Lai of Apple contains the following command:
Resolve Alias <pathname> is the full pathName of the alias file.
Result : string -- The XFCN return the resolved alias path. Any level-depth
aliasing is resolved. If the pointed file is on a distant volume, the
result will contain a second line : "<zone name>:<server name>"
Bryan Kaufman
"Fox, Christopher B" wrote:
>
Folks:
>
>
I've been working on a droplet that will accept up to ten files and
>
folders, and then place the paths of those files and folders on the chosen
>
application's clipboard. However, when the files reside on a mounted network
>
volume, I can't figure out how to add the server name or IP address to the
>
beginning of the path.
>
>
Here is the script thus far:
>
>
on open theseItems if (count of theseItems) > 10 then
>
display dialog "Please select fewer items." buttons {"OK"} default button
>
{"OK"} return end if set thePaths to "" repeat with anItem
>
in theseItems set thePaths to thePaths & (anItem as string)
>
if anItem is not the last item in theseItems then set
>
thePaths to thePaths & return end if end repeat tell
>
application "Finder" set facelessProcs to {"Control Strip
>
Extension", "DVD AutoLauncher", "Folder Actions", "Instant Palm Desktop",
>
"Timbuktu Extension", , "Time Synchronizer", "File Sharing
>
Extension", "Serial Port Monitor", "ShareWay IP Personal Bgnd", "Paths to
>
Clipboard"} set theProcs to name of every process whose name is
>
not in facelessProcs end tell tell application ((choose from list
>
theProcs with prompt , "Choose an application:" without multiple
>
selections allowed and empty selection allowed) as text)
>
activate set the clipboard to thePaths end tellend open
>
>
Any idea how I can retrieve the name of the server on which a file resides,
>
so that instead of:
>
>
Macintosh HD:My Docs:a spreadsheet.xls
>
>
I get:
>
>
TheServersName/Macintosh HD:My Docs:a spreadsheet.xls
>
>
Thanks!
>
>
Christopher Fox
>
MTS \ Capital One
>
>
>
**************************************************************************
>
The Information transmitted herewith is sensitive information intended only
>
for use to the individual or entity to which it is addressed. If the reader
>
of this message is not the intended recipient, you are hereby notified that
>
any review, retransmission, dissemination, distribution, copying or other
>
use of, or taking of any action in reliance upon, this information is
>
strictly prohibited. If you have received this communication in error,
>
please contact the sender and delete the material from your computer.
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users