diff --git a/resources/docs/docs/widgets/scripting.md b/resources/docs/docs/widgets/scripting.md index febcddf1..d56f61fc 100644 --- a/resources/docs/docs/widgets/scripting.md +++ b/resources/docs/docs/widgets/scripting.md @@ -163,7 +163,7 @@ Sets the value of a widget's custom variable (see [advanced syntaxes](./advanced #### `send(target, address, ...args)` - `target` (optional): `"ip:port"` or `"midi:device_name"` string. If omitted, the widget's target will be used. - `address`: osc address, must start with a `/` -- `args`: value or `{type: "OSC_TYPE_LETTER", value: VALUE}` `object` +- `args`: values or `{type: "OSC_TYPE_LETTER", value: VALUE}` objects Sends an osc message. @@ -171,6 +171,15 @@ If the event that triggered the script's execution was not initiated by a user i This function ignores the widget's `bypass` property. +??? infos "Examples" + ```javascript + send('127.0.0.1:4444', '/address', 1) + send('127.0.0.1:4444', '/address', 1, 2) + send('/address', 1) // uses the widget's target + send('/address', {type: 'i', value: 1}) // sends 1 as an integer + ``` + + ---- #### `getProp(id, name)`