I'm thinking this will work...
- Code: Select all
try:
newvar = indigo.variables["MyVarName"]
except:
newvar = indigo.variable.create("MyVarName")
But I'm wondering if something like this might do it too..
- Code: Select all
if "MyVarName" is in indigo variables[]:
logic
logic
Any thoughts on which of these is preferred?