jean-emmanuel / open-stage-control

Libre and modular OSC / MIDI controller
https://openstagecontrol.ammd.net
GNU General Public License v3.0
695 stars 88 forks source link

[Bug] Setting HTML value in HTML frame widget fails #813

Closed DjTuxeedo closed 1 year ago

DjTuxeedo commented 1 year ago

Hey there, first of all: "Open Stage Control is awesome!" I love working with it. I'm using version 1.22.0 and I'm sending OSC messages via a supercollider script. I figured out how I can manipulate some widgets via OSC messsages. Let's say this works to manipulate a fader from supercollider -> OpenStageControl: n.sendMsg("/fader_1", 0.5); Or change a text in a text display widget: n.sendMsg("/text_1", "HelloWorld");

But I cannot figure out how to change the html body of an HTML frame widget. I've tried:

n.sendMsg("/html_1","HelloWorld"); n.sendMsg("/html_1/html","HelloWorld"); n.sendMsg("/html_1/value","HelloWorld"); n.sendMsg("/html_1/html","HelloWorld"); n.sendMsg("/html_1","{\"html\":\"HelloWorld\"}");

None of these change anything in the frontend. But i do get debug messages that these messages have been received.

Could somebody give me a pointer how to manipulate the html body of an html widget? Thank you so much

DjTuxeedo commented 1 year ago

btw. same thing with the SVG frame widget

jean-emmanuel commented 1 year ago

Thanks !

The html/svg widgets don't hold an actual value, it's the content of their html or svg properties you need to feed to change their html/svg content. To expose these properties to osc messages the simplest way is to write for example

OSC{example}

in the the property, then the content of that piece of code will depend on what you send to open stage control on osc address /widget_address/example This syntax is documented here.

For further usage question please use the forums so that more users can help or benefit from the answers : https://openstagecontrol.discourse.group/