Based on this post viewtopic.php?p=99891#p99891 I am using an Indigo variable to store the parameter to be passed.
Is there any way to serialize the execution or other ideas of how to pass a parameter effectively?
Example code. Call Test 1 is the script that sets the variable to the parm and executes the action group multiple times:
- Code: Select all
parmVar=indigo.variables[1037427998]
indigo.variable.updateValue(parmVar, "Value 1")
parmVar.refreshFromServer()
indigo.server.log("1-1: "+parmVar.value)
indigo.actionGroup.execute("Call Test 2")
indigo.variable.updateValue(parmVar, "Value 2")
parmVar.refreshFromServer()
indigo.server.log("1-2: "+ parmVar.value)
indigo.actionGroup.execute("Call Test 2")
Call Test 2 is the script in the action group that simply logs the parm value from the variable:
- Code: Select all
parmVar=indigo.variables[1037427998]
parmVar.refreshFromServer()
parm=parmVar.value
indigo.server.log("2-1: "+parm)
The output from executing Parm Test 1 is:
- Code: Select all
Action Group Call Test 1
Script 1-1: Value 1
Action Group Call Test 2
Script 1-2: Value 2
Action Group Call Test 2
Script 2-1: Value 2
Script 2-1: Value 2
What is desired would be:
- Code: Select all
Action Group Call Test 1
Script 1-1: Value 1
Action Group Call Test 2
Script 2-1: Value 1
Script 1-2: Value 2
Action Group Call Test 2
Script 2-1: Value 2
Thanks