• 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: Droplet for CD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Droplet for CD


  • Subject: Re: Droplet for CD
  • From: Jolly Roger <email@hidden>
  • Date: Wed, 19 Sep 2001 11:14:40 -0500

On 9/19/2001 9:57 AM, "Sprague, Graham" <email@hidden> wrote:

> if (disk of the (info for this_item) is true) then

Hi Graham,

The "info for" command returns a "file information" record. There is no
"disk" field in the "file information" class defined in Standard Additions.
So that's not going to work. The "info for" command doesn't return any
useful information for this purpose.

I would suggest instead using Akua Sweets "disk volume info" command to
obtain a "Volume Info Rec" record, and examining the "vol device kind" field
of the record to determine if it is a CD. If it = cd volume, then you have
a CD.

Note: You could also use the "vol alias" field to obtain an alias to the
actual volume, which would allow users to drag *any* file or folder on the
volume to your droplet.

Check this out (watch for line wraps):

-- begin script
on open itemList

repeat with i from 1 to the count of itemList

set nextItem to item i of itemList

set the volumeInfo to the disk volume info for (nextItem as text) --
Akua Sweets

set volumeAlias to the volumeInfo's vol alias -- Akua Sweets

if the volumeInfo's vol device kind is cd volume then -- Akua Sweets
display dialog ("\"" & (volumeAlias as text) & "\" is a CD.")
buttons {"OK"} default button 1
else
display dialog ("\"" & (volumeAlias as text) & "\" is not a
CD.") buttons {"OK"} default button 1
end if

end repeat

end open
-- end script

HTH

JR


  • Prev by Date: Re: Convert any list to a table?
  • Next by Date: RE: Convert any list to a table?
  • Previous by thread: Droplet for CD
  • Next by thread: RE: Droplet for CD
  • Index(es):
    • Date
    • Thread