• 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: Notification of Device Addition/Removal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Notification of Device Addition/Removal (From: Reg Cheramy <email@hidden>)

  • Prev by Date: Re: how to get os version?
  • Next by Date: Re: Quit application
  • Previous by thread: Re: Notification of Device Addition/Removal
  • Next by thread: Re: Notification of Device Addition/Removal
  • Index(es):
    • Date
    • Thread