• 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: select any cd (WAS:applescript-users digest, Vol 2 #880 - 16 msgs)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: select any cd (WAS:applescript-users digest, Vol 2 #880 - 16 msgs)


  • Subject: Re: select any cd (WAS:applescript-users digest, Vol 2 #880 - 16 msgs)
  • From: David Reynolds <email@hidden>
  • Date: Tue, 24 Jul 2001 14:58:40 -0700

on 2001.07.20 11:38, John McElwain said:

>>> How would one select any cd (not by name) without selecting other disks or
>>> folders?
>>
>> Try something like this:
>>
>> every disk whose free space = 0 ,
>> and capacity > 6.5E+8 ,
>> and capacity < 7.0E+8
>>
>> The "free space" expression includes any read-only disks,the lower capacity
>> limit assumes that the CD is more or less full, and the upper limit should
>> ignore DVDs and such.
>>
>> Does anyone happen to know what the actual maximum number of bytes an HFS (or
>> HFS+) CD can hold?
>
> The problem with the above approach is that a CD volume could have a little
> as 14 Mb of capacity.
>
> Akua's Sweets Volume Info Record contains a property called vol device kind.
> There must be a more elegant way to approach this, but the following seems
> to work...

<snip>

For a plain vanilla solution, look for any removable media that is read-only
and is less than 700MB. It'll end up including locked floppies and locked
Zips, but I haven't used a floppy other than as a Frisbee for about a year,
and the click-of-death left me gun-shy of the other...

(MacOS 9.1, AS 1.6, no 3rd party osaxen)

--begin script--
tell application "Finder"
set theDiskList to every disk whose ejectable is true and (opt+enter)
protected is true and capacity is less than (700 * 1048576)
end tell
--end script--

Or this one I just found...

--begin script--
tell application "Finder"
set theDiskList to every disk whose description starts with "CD-ROM"
end tell
--end script--


References: 
 >Re: applescript-users digest, Vol 2 #880 - 16 msgs (From: "John McElwain" <email@hidden>)

  • Prev by Date: Re: Contextual Menu Items
  • Next by Date: Re: Contextual Menu Items
  • Previous by thread: Re: applescript-users digest, Vol 2 #880 - 16 msgs
  • Next by thread: Re: How do I make applescript wait for application to finish before continuing?
  • Index(es):
    • Date
    • Thread