[ANSWERED]Timing of events within a script

Posted on
Tue Aug 05, 2014 12:30 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

[ANSWERED]Timing of events within a script

I have an action group turning on some devices, then run an AppleScript and then turning off some devices.

The script is saying a bunch of stuff. Let's say it takes the computer 30 secs to speak its stuff. How can I make sure that the Indigo action running after the script, i.e the device turning off part, is not executed until the speaking is done?
Currently I have a delay set for the turning off part, but the delay has to be adjusted for whatever speech length I have. Is there a better way to do this?

Also, would a 30sec speech script slow down the indigo server if I run it embedded, or is it better to run this as an attached script?

Posted on
Tue Aug 05, 2014 3:22 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Timing of events within a script

Actions in action groups, triggers, and schedules are parallelized as much as is possible, so using a mix of actions in the UI won't work.

What you can do though is just execute a single Python script file (file, not embedded) that would:

  1. Execute the action group to turn on the devices
  2. Tell the server to speak the string - the Python command allows you to specify that it should wait until the speech is finished before continuing
  3. Execute the action group to turn off the devices

Check out the indigo.server.speak and indigo.actionGroup.execute commands in the IOM (Python scripts)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Aug 05, 2014 3:52 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

Re: [ANSWERED]Timing of events within a script

thanks for the help.
Sticking for right now with AppleScripts, how do I refer to an Indigo variable with an external applescript? The usual variable named "myVariable" does not work for external scripts.

Posted on
Wed Aug 06, 2014 1:31 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: [ANSWERED]Timing of events within a script

Code: Select all
value of variable "myVariable"


Note: just like any other AppleScript, it must be inside a tell block to the IndigoServer process.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 10 guests

cron