Page 3 of 3

Re: Incrementing a variable and parsing string

PostPosted: Sat Mar 28, 2020 10:53 am
by FlyingDiver
I strongly recommend you take one of the on-line Python training courses.

Re: Incrementing a variable and parsing string

PostPosted: Sun Mar 29, 2020 9:06 am
by hamw
thanks very much! And I have been looking over the online documentation... takes time...

Since the parts of the script work individually, maybe the simplest thing is to just use as conditional to evaluate the script and allow different triggers to pass. I tried the following:

Code: Select all
vaux_response_string = indigo.variables[1925362107].value #VauxResponse variable
junk, command, details = vaux_response_string.split(',', 2)
indigo.variable.updateValue(1975852637, command)
if indigo.variables[1975852637].value == "3":  ### for instance
   indigo.variable.updateValue(1975852637, "True")
TrueFalse = indigo.variables[1975852637].getValue(bool)
if TrueFalse == True:
   pass


but it does not resolve to a boolean...

I looked in the indigo documentation and can't find specific information on using conditionals in triggers. If I can get that to execute the trigger all will be well.

Re: Incrementing a variable and parsing string

PostPosted: Sun Mar 29, 2020 9:21 am
by FlyingDiver
hamw wrote:
thanks very much! And I have been looking over the online documentation... takes time...

Since the parts of the script work individually, maybe the simplest thing is to just use as conditional to evaluate the script and allow different triggers to pass. I tried the following:

Code: Select all
vaux_response_string = indigo.variables[1925362107].value #VauxResponse variable
junk, command, details = vaux_response_string.split(',', 2)
indigo.variable.updateValue(1975852637, command)
if indigo.variables[1975852637].value == "3":  ### for instance
   indigo.variable.updateValue(1975852637, "True")
TrueFalse = indigo.variables[1975852637].getValue(bool)
if TrueFalse == True:
   pass


but it does not resolve to a boolean...

I looked in the indigo documentation and can't find specific information on using conditionals in triggers. If I can get that to execute the trigger all will be well.


The script I posted should work. I don't understand what you're trying to accomplish in this short script. Maybe you could recap what's working for you and what's not.

Re: Incrementing a variable and parsing string

PostPosted: Sun Mar 29, 2020 9:38 pm
by hamw
Joe, that works perfectly. Thank you so much.

I was trying to see how to get that conditional to work as I have some other ideas as well.

Much appreciated!