• 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
Identifying a DVD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Identifying a DVD


  • Subject: Identifying a DVD
  • From: Jesse Shanks <email@hidden>
  • Date: Sun, 13 Oct 2002 19:41:43 -0700

In writing a DVD script, I want to get the name of a DVD disc... Meaning the
name seen in the Finder ...and have the following script to identify a
mounted disk as a DVD:

set diskStats to {}
tell application "Finder"
set diskNames to list disks
repeat with i from 1 to count of diskNames
set y to item i of diskNames
set x to format of disk y
set x1 to capacity of disk y
set x1 to round (x1 / 1.0E+9)
set x2 to free space of disk y
set x3 to ejectable of disk y
if x is UDF format and x1 is greater than 3 and x2 is 0.0 and x3 is
true then
copy {{y}, {x, x1, x2, x3}} to end of diskStats
end if
end repeat
end tell

return diskStats

I have tested it against various DVDs. My questions are: Is this the best
way to do this? Is there ways it will fail in which I don't expect (besides
the obvious if the disk has less than 3 GB burned on it)?

Thanks.
--
Jesse Shanks
Writer & Web Developer
http://www.blankreb.com
email@hidden
530.886.0815
-
http://www.catsprite.com
http://www.digitallyobsessed.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.

  • Prev by Date: Re: Way to configure Outlook Express user/pass?
  • Next by Date: Re: Way to configure Outlook Express user/pass?
  • Previous by thread: Re: Way to configure Outlook Express user/pass?
  • Next by thread: image conversion
  • Index(es):
    • Date
    • Thread