AppleScript help

Posted on
Tue Dec 20, 2011 9:19 pm
chrismoore offline
Posts: 28
Joined: Dec 02, 2011

AppleScript help

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.

Posted on
Tue Dec 20, 2011 9:26 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: AppleScript help

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.

Image

Posted on
Tue Dec 20, 2011 9:45 pm
chrismoore offline
Posts: 28
Joined: Dec 02, 2011

Re: AppleScript help

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.

Posted on
Tue Dec 20, 2011 10:57 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: AppleScript help

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests