Incrementing a variable and parsing string

Posted on
Sat Mar 28, 2020 10:53 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Incrementing a variable and parsing string

I strongly recommend you take one of the on-line Python training courses.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Mar 29, 2020 9:06 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Incrementing a variable and parsing string

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.

Posted on
Sun Mar 29, 2020 9:21 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Incrementing a variable and parsing string

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.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Mar 29, 2020 9:38 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Incrementing a variable and parsing string

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!

Who is online

Users browsing this forum: No registered users and 6 guests