Can someone confirm this...

Hi,

I wrote a quick test to see whether a Mac supports motion sensors. The variable testSMS should return either true or false depending on whether sudden motion sensors are supported. As both my Macs do support this I would like to test the code on a computer that doesn’t. Could someone confirm this?

set testSMS to (do shell script "ioreg -l | grep SMCMotionSensor") contains "active"

I have some macs I will test this on when I get to work.

Hi, I tried it on my ageing G4 Power Mac and got this message:

The command exited with a non-zero status.

All the best,

Kev.

Hi,

on my G5 Dual I get an error so I would add a few lines to trap the error

try
	set testSMS to (do shell script "ioreg -l | grep SMCMotionSensor") contains "active"
on error
	false
end try

Hi Stadsman,
I have an Intel MacBook w/SMS sensor. I ran StefanK’s script and the result was “True”. I hope this helps you. As far as I am concerned, it works.

All the best,
Chris D.

Model: Intel MacBook
AppleScript: 2.11
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Thanks guys, seems like it works. And thanks Stefan for adding the trap.

What do you need this script for? :confused:
Have you found a way to read SMS movement with applescript!!?? :o

Not a major discovery, it’s been done before. You need amstracker and call it from the command line or through a shell script…