• 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: Telling if a Mac is equipped with a built-in iSight
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Telling if a Mac is equipped with a built-in iSight


  • Subject: Re: Telling if a Mac is equipped with a built-in iSight
  • From: Stan Cleveland <email@hidden>
  • Date: Tue, 27 Sep 2011 11:38:04 -0700

On Sep 27, 2011, at 11:13 AM, Jim Thorton wrote:

Umm...  I wonder if AppleScript is robust enough to tell us if a computer is equipped with a built-in iSight camera?  I have one app that utilizes a built-in iSight camera.  So it has to see at first if the computer is equipped with one  And it uses ioreg (Shell).  If the computer is running Snow Leopard, ioreg will have a line like the following.

Built-in iSight@fd110000

Well, I was naive.  I just happened to notice that ioreg doesn't report this line under Lion.  So I need a different approach in telling if the computer is equipped with a built-in iSight.

Thank you for your advice.

Hi Jim,

I beleive this works in Lion. Use the following command to get the data you need:
set hardwareData to do shell script "system_profiler SPUSBDataType"
Look for and parse this chunk of data:
Built-in iSight:
Product ID: 0x8502
Vendor ID: 0x05ac  (Apple Inc.)
Version:  1.60
Serial Number: 8J81X41xxxxxxxxx
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0xfd400000 / 3
Current Available (mA): 500
Current Required (mA): 500

Or even better, get the data as XML and parse that with System Events, XML Tools.osax, or XMLLib.osax:
set hardwareData to do shell script "system_profiler -xml SPUSBDataType"

Stan C.
--
"It's déjà vú all over again." -- Yogi Berra
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Telling if a Mac is equipped with a built-in iSight
      • From: Jim Thorton <email@hidden>
References: 
 >Telling if a Mac is equipped with a built-in iSight (From: Jim Thorton <email@hidden>)

  • Prev by Date: Re: Telling if a Mac is equipped with a built-in iSight
  • Next by Date: Re: Telling if a Mac is equipped with a built-in iSight
  • Previous by thread: Re: Telling if a Mac is equipped with a built-in iSight
  • Next by thread: Re: Telling if a Mac is equipped with a built-in iSight
  • Index(es):
    • Date
    • Thread