Re: Detecting when a CD has mounted on the desktop.
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