String tokenizer?

Hey All,
I am very new to TouchDesigner and am having a little trouble. I have a URL that is hosting an RGB value for me in the form of 141|152|033. I put in a Web DAT that is returning the right value. In python I need to run the following command, unless there is another way to extract the values.

values = text.split("|")   
  • How do I add some python to do the processing?
  • How do I get the html response as a value?
  • How do I return a value from the python?
  • How do I change the value from a String to a Number?

Bonus points…

  • How do I set up a timer to call my url every 5 seconds?

Thanks for your help!

Have you tried with the convert Dat?
Then you can use “split cells at |” to create a table with your values separated.

For the five seconds interval perhaps you should look into the timer chop? It has callbacks functions that allows to run a script anytime the timer reaches a certain state.

Hope that helps!

@FaustoB Thanks for the quick reply.
The Datto worked like a charm, no need to go into python! It is making a table with chan1, chan2, chan3. Now I am pushing the data into a constant with the following syntax. I looks like this thing is gonna work!

op(‘datto1’)[0][0]