Button name (label) via osc

Hello friends!

I am not able to make the button show the label via osc.
i am sending a string message to the button id but this is not working.

I also created a text indicator and it receives the information correctly, so I probably need to activate something in the button settings to enable receiving the label, correct!? Can someone help me please? Thank you very much!

By default, a widget only expose their own value to osc messages (which must match their address and preArgs as per this). To expose a property such as label to osc messages, you can use the advanced syntax OSC{} (documented here):

When writing

OSC{example}

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

Thanks a lot for the help @jean-emmanuel ! I took a look at the links but the whole thing is still confused about how to do it. Could you give me an example? Type:

Button_1

How and where to write this script?
With an example it will be easier to understand, thank you very muc

Write OSC{example} in the label property and follow the instructions from my previous post.

I had already tried that and it didn't work.
Going deeper into the experiments I created a new project with just one button and repeated the same process. This time the button received the label message correctly, I went back to my project to understand what was different between the buttons and I realized that what prevents the button in my project from receiving the label message is the fact that it is configured to send a message /control in the OSC window.
The fact that it is configured to send a midi CC message is what is preventing it from receiving the label message.

It works in this case too but the difference that your widget has preArgs which must be provided in the osc message (otherwise you wouldn't be able to use that feature on 2 widgets sending different /control messages. As described in the 2nd page linked above you can ignore the widget's preArgs by passing some extra arguments to the OSC{} code, for instance:

OSC{example, "default label", false}

Will do that.

this!?

didn't work for me :frowning:

Just tested it, sending /control/example some_string to o-s-c changes the label as expected.

Hmmm, got it! I mean... I managed to make it work, :grinning:, to understand I'm going to have to study a lot of programming language, I don't know anything about this world.

In the end I adjusted and changed the sending address of the osc message from "/button_1/example" to "control/example". Then it worked!! Thank you @jean-emmanuel for your time.

If I understood correctly, the "ID" of the widget is assigned to the address pointed in the OSC window, correct?

In my case, as I have several buttons that I want to send this label message, I'm going to create the label address according to the button, like; /control/label_button_1, ... , /control/label_button_32

Thank you one more time!! I researched a lot about this and didn't find anything that would help beginners like me, I believe this topic will be useful for a lot of people!

If I understood correctly, the "ID" of the widget is assigned to the address pointed in the OSC window, correct?

The address property defaults to /widget_id when not explicitly set ("auto").

In my case, as I have several buttons that I want to send this label message, I'm going to create the label address according to the button, like; /control/label_button_1, ... , /control/label_button_32

Sounds good !