Help with old Applescripts

Posted on
Tue Oct 15, 2019 5:26 pm
cmfulmer offline
Posts: 23
Joined: Jan 05, 2011

Help with old Applescripts

I'm trying to get a few pair of light switches to sync device state. Here's the applescripts I have:
trigger "Garage Master", action #1: execute embedded AppleScript "set on state of device "Garage Slave" to on state of device "Garage"..."
trigger "Garage Slave", action #1: execute embedded AppleScript "set on state of device "Garage" to on state of device "Garage Slave"..."
trigger "Side Flood Lights Master", action #1: execute embedded AppleScript "set on state of device "Side Flood Lights Slave" to on state of device "Side Flood Lights"..."
trigger "Side Flood Lights Slave", action #1: execute embedded AppleScript "set on state of device "Side Flood Lights" to on state of device "Side Flood Lights Slave"..."
trigger "Garage Eve Master", action #1: execute embedded AppleScript "set on state of device "Garage Eve Slave" to on state of device "Garage Eve"..."
trigger "Garage Eve Slave", action #1: execute embedded AppleScript "set on state of device "Garage Eve" to on state of device "Garage Eve Slave"..."
trigger "Curtain Outlet", action #1: execute embedded AppleScript "turn off "Curtains" in 10..."
trigger "Basement Master", action #1: execute embedded AppleScript "set on state of device "Basement Slave" to on state of device "Basement"..."
trigger "Basement Slave", action #1: execute embedded AppleScript "set on state of device "Basement" to on state of device "Basement Slave"..."
trigger "Stairs", action #1: execute embedded AppleScript "set on state of device "Stairs Master" to on state of device "Stairs"..."
trigger "Stairs Master", action #1: execute embedded AppleScript "set on state of device "Stairs" to on state of device "Stairs Master"..."

Can I do this directly through the 'triggers' pane now, or do I need to convert to Python?

Thanks,
Chad

Posted on
Tue Oct 15, 2019 7:31 pm
FlyingDiver offline
User avatar
Posts: 5351
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Help with old Applescripts

There's a "Match On State of Device" action available now which does what you want.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 16, 2019 9:43 am
jay (support) offline
Site Admin
User avatar
Posts: 16820
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Help with old Applescripts

FlyingDiver wrote:
There's a "Match On State of Device" action available now which does what you want.


+1. This should greatly simplify your triggers... ;)

[MODERATOR NOTE] moved to appropriate forum.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Oct 16, 2019 4:25 pm
cmfulmer offline
Posts: 23
Joined: Jan 05, 2011

Re: Help with old Applescripts

I saw that when I was looking it over, and wasn't sure if that was the way to go or not. Thanks!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests