Lengthy execution scripts

Posted on
Thu Oct 02, 2003 1:28 pm
unowen offline

Lengthy execution scripts

If Indigo is running a script does it halt all other functions? When I had Thinking Home I would have it execute several scripts that took some time to execute and sometimes I wanted to stop them in the middle/cancel. For example:
I had one script that would fetch the weather and read it off. 1) how would I implement this script in Indigo (in-line, make external, compiled script in attachments?) 2) how would I interrupt the execution of the script?

Similarly:
I had a script that would gradually dim lights and lower the volume of iTunes over 10 minutes. How would I implement this in Indigo so that if I sent the trigger again, it would stop the script and start executing from the beginning? Will the execution of this script prevent the use of other Indigo commands? How would I cancel the script mid-execution?

Posted on
Thu Oct 02, 2003 5:20 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Lengthy execution scripts

Indigo currently runs all AppleScripts in the main thread (we are investigating changing this for Indigo 2.0), so most Indigo processing will wait until the script finishes. You can get around this by saving the script as an Application -- then it will run in its own process. I believe you should be able to send a quit AppleEvent to an AppleScript application to cancel it, but I've never tried it before. How did you handle this with Thinking Home?

regards,
matt

Posted on
Wed Oct 15, 2003 8:42 am
gregjsmith offline
Posts: 946
Joined: Apr 01, 2003
Location: Rio Rancho, NM

(No subject)

I would like to see each new "event" run under its own thread. However Indigo will need to keep from trying to send multiple power line commands at the same time.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 26 guests