Use text from text widget in custom module

I want to be able to grab the text from a text widget and define the value of a variable within my custom module but don’t know where to start with this one. For example something like in the CM

let myVariable = myTextWidget.value

The widget objects are not exposed at all in the custom module, you can only communicate between the client and custom module using osc messages. You could use the remote control command /GET to make a widget send its value and catch it in the oscInFilter function.

Is /GET resource heavy? I want to create a configuration page that has all the midi targets and file paths etc in text boxes, use the custom module on initiation to grab the values then use OSC listeners to set the midi targets. Long term aim being that I don’t need to keep editing the custom module.

Is /GET resource heavy?

It's not.

I want to create a configuration page that has all the midi targets and file paths etc in text boxes, use the custom module on initiation to grab the values then use OSC listeners to set the midi targets.

Why use a custom module then ? You could use @{} instead of OSC{} to use the config values directly in the client

In theory yes - but my custom module also uses the same configuration values in some of the stuff that it does so need to get them nto there too.

Will try /GET and see how I get on. Thanks.

By the way, when setting the text widget's value, it can send a message if its target is set (or via scripting), you could catch this message in the custom module.