o.expr.codebox with arguments?

marleynoe's icon

Hi,

is there a way of using patcherargs in conjunction with o.expr.codebox (or setting the text programmatically)? Sometimes there might be some odot code doing parsing or conditioning of sensor data and I would like to build an abstraction and set the osc-address as arg. Otherwise, I would think of using js / patcher scripting in order to script a o.expr.codebox object with text inside - haven't tried though and not sure if it is possible?

Cheers, M

TFL's icon

Could you provide an example patch of what you want to achieve?

Right now it sounds like you just want to set a custom address using patcherargs, and you could do that easily like so: [o.pack #1] or [o.route #1] and it would be enough. You can also change those addresses using the set message.

If you really really want to construct your address in [o.expr.codebox], it doesn't parse pound signs, but you pass them as their own message, and construct your custom address out if this using assign() (see the "dynamic addresses" tab of [o.expr.codebox] help file). Here i put a customName message but you could replace that by a [loadmess #1] or [patcherargs] to get your patcher argument.