Page 1 of 1

AppleScript help

PostPosted: Tue Dec 20, 2011 9:19 pm
by chrismoore
Hi, I'm not very good with AppleScript yet. I would like to use a script in a trigger that checks the status of the motion detector in my kitchen, and if it's in the off state, turn off the lights. Any help appreciated, thanks.

Re: AppleScript help

PostPosted: Tue Dec 20, 2011 9:26 pm
by matt (support)
Are you using Indigo 5? It supports conditions in the Conditions tab against device states, so I am not sure you need to use a script at all.

Re: AppleScript help

PostPosted: Tue Dec 20, 2011 9:45 pm
by chrismoore
Yes, but what I have is a scheduled event that changes several device states as its action, but the kitchen lights are the only one of the list I want to check the motion detector status first. I thought executing an AppleScript would be easier, so that condition is set for only the kitchen lights, and the others just run normally.

Re: AppleScript help

PostPosted: Tue Dec 20, 2011 10:57 pm
by jay (support)
Easiest way is to have two different schedules with identical time/date specifiers - one for the one that does all with no condition and another one that has the condition. No scripting required.