Timing of variable change

Posted on
Tue Nov 04, 2014 8:15 am
ken_jacobs offline
Posts: 187
Joined: Jul 23, 2005

Timing of variable change

I have a string of actions in which I initially set the value of a variable to the value of another variable. The actions following the variable change use the modified variable value. I find that the actions use the old value then the variable value is changed. I ended up writing an applescript to make the change and that solved the problem.

Posted on
Tue Nov 04, 2014 8:20 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Timing of variable change

I think I know what might be occurring but can you copy/paste your script into a reply so we can see more details?

Image

Posted on
Tue Nov 04, 2014 8:22 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Timing of variable change

ken_jacobs wrote:
I have a string of actions in which I initially set the value of a variable to the value of another variable. The actions following the variable change use the modified variable value. I find that the actions use the old value then the variable value is changed. I ended up writing an applescript to make the change and that solved the problem.

I think (possibly) the reason that the actions following the variable change use the old values is because when you launch a series of actions, Indigo runs them in parallel. So it is likely that the variable is getting changed after the action that uses it.

I believe it is on the request list for Indigo to be able to run actions one after the other.

In the meanwhile, the simplest solution is to put a small delay in the subsequent actions (i.e. the actions that need the new variable value) of say 0.5 seconds. :)

Posted on
Tue Nov 04, 2014 8:30 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Timing of variable change

Ah, yes. If this is not a script but a list of actions in the GUI then autolog is correct and the delay is the workaround.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests