Help With Simple Scripting Behavior

Hello, I'm coming over from TouchOSC. Beginning to learn the very introductory scripting techniques in OSC. I am trying to recreate some of the things I was doing in TouchOSC.

  set ('sync_status', 'Sessions In Sync!')
  set ('sync_status', 'Sessions Out Of Sync!')

I have 3 text indicators; I want two of them to be compared against one another, populating the text of third depending on the outcome. That part I have succeeded at. However, if the test fails, I want both of the compared indicators to change to a red color. Would I use the updateProp() method here?

Thank you!

updateProp() can't change the content of a property, it's kind of a legacy function as I don't seem to recall a single use case for it... :slight_smile:

You can use the VAR{} syntax (see advanced syntaxes) in the colorWidget property of your text widgets like so

VAR{color, auto}

and change the content of this variable named "color" using the setVar function in your script:

setVar('ableton_section_a', 'color', 'red')
setVar('ableton_section_b', 'color', 'red')

Brilliant! Can it be set from Hex String as well?

I edited my post (missing quotes around "red").

Any valid css color will work (e.g. #ff0000, rgb(255,0,0), etc)

Thank you!