• 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: Detecting when a CD has mounted on the desktop.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting when a CD has mounted on the desktop.


  • Subject: Re: Detecting when a CD has mounted on the desktop.
  • From: Ken Dobson <email@hidden>
  • Date: Sun, 25 Mar 2001 22:52:36 -0500

> Subject: Detecting when a CD has mounted on the desktop.
>
> Hi,
>
> Does anyone know of a way to detect when a CD has been mounted on the
> desktop? I'm putting together a script that compares bytes between
> files on a CD and files on disc, but I need a way to detect when the
> CD has been inserted.
>
> Ideally the script will be checking up to 50 CDs in one session, so I
> need a quick and reliable detection method.
>
> Thanks in advance.
>
> Alan.

This is a start:
--
on idle
tell application "Finder"
set Dlist to name of disks
repeat with i from 1 to count of Dlist
if (ejectable of disk i  false) then
set Vol to round ((capacity of disk i) / 1024000)
display dialog "You have mounted " & (item i of Dlist) &
return & ,
"Capacity of " & (item i of Dlist) & " is " & Vol & "
MB"
end if
end repeat
end tell
return 10
end idle


  • Follow-Ups:
    • Re: Detecting when a CD has mounted on the desktop.
      • From: "Christopher C. Stone" <email@hidden>
  • Prev by Date: Re: Is AppleScript 1.6 for 9.1 released yet?
  • Next by Date: Re: Scripting the Mac OS X mail app
  • Previous by thread: Detecting when a CD has mounted on the desktop.
  • Next by thread: Re: Detecting when a CD has mounted on the desktop.
  • Index(es):
    • Date
    • Thread