Convert to Python

Posted on
Sun Aug 30, 2020 6:37 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Convert to Python

Tried piecing together some other bits of Python scripts people have helped me with here but cant get this one working.
Code: Select all
set theText to "Ch " & (value of variable "DTVchannelNumber") & " - " & (value of variable "DTVprogramTitle")
set the value of variable "DTVall" to theText
set the value of variable "Message_Upper" to theText


Appreciate any help getting it converted.

Thanks,

Carl

Posted on
Sun Aug 30, 2020 10:22 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Convert to Python

Code: Select all
theText ="Ch" + indigo.variables["DTVchannelNumber"].value + "-" +  indigo.variables["DTVchannelNumber"].value
indigo.variable.updateValue("DTVall", theText)
indigo.variable.updateValue("Message_Upper", theText)
should it

Posted on
Mon Aug 31, 2020 8:23 am
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Convert to Python

Perfect, thanks!

Carl

Posted on
Mon Aug 31, 2020 8:31 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Convert to Python

I forgot the spaces around the - in "-" should be " - "
theText ="Ch" + indigo.variables["DTVchannelNumber"].value + " - " + indigo.variables["DTVchannelNumber"].value
indigo.variable.updateValue("DTVall", theText)
indigo.variable.updateValue("Message_Upper", theText)
Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest