Because you’re already using GP Script, the simplest option will be add a line to send an OSC message out with your label text:
var button_2, label_2 : Widget
On WidgetValueChanged(newValue : double) from button_2
newValue == 1 do
newValue == 0 do
In TouchOSC, as long as you match up the address it will work:
Option 2 is to use the scripting in TouchOSC to update the label text. Because there was already an OSC message being generated by the button widget in GP, you can add a script in TouchOSC to update the label text. But this means you have to learn another scripting language!
OnOffButton.tosc.zip (1.6 KB)