Re: Notification of Device Addition/Removal
Re: Notification of Device Addition/Removal
- Subject: Re: Notification of Device Addition/Removal
- From: Matthew Smith <email@hidden>
- Date: Fri, 16 Nov 2001 09:16:14 +1100
on 14/11/01 13:12, Reg Cheramy at email@hidden wrote:
>
I'd like an applescript that can notify and take action when a new device
>
has been added to my computer.
>
>
Is there a way to know the following:
>
>
a) DVD Inserted
>
b) Audio CD Inserted
>
c) Video CD Inserted
>
d) USB Device Inserted
>
- Camera
>
- USB->Serial Interface
>
- USB Speakers
>
- Printer
>
- Etc
>
e) Firewire Device Inserted
>
- Digital Video Camera
>
- New Hard Drive (by polling the disks of Finder... yes)
>
- iPod
>
- Etc
You could periodically ask get a list of the disks (a, b and c), which could
also be a new FireWire or USB hard drive. It won't help if it is a removable
disk drive and there is no disk inserted.
tell application "Finder" to name of every disk
The others would be a lot harder.
How does the iPod get recognised in iTunes? Is that what the iTunes Helper
app is for? I suppose this sort of thing needs to written as a real program,
not an AppleScript.
--
Matthew Smith