diff --git a/CHANGELOG.md b/CHANGELOG.md index 6de207b1..c845e003 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ - panel: tab rendering issue when initialized with a non-numeric value - panel: minor style issue in tab navigation bar - scripting: scripting functions not working inside `browseFile()` callback - + - scripting: using `external: true` in `set()` should prevent affected widget from sending any message + ## 1.25.2 - bug fixes diff --git a/resources/docs/docs/widgets/scripting.md b/resources/docs/docs/widgets/scripting.md index 37959f9b..394ba49f 100644 --- a/resources/docs/docs/widgets/scripting.md +++ b/resources/docs/docs/widgets/scripting.md @@ -141,7 +141,7 @@ Returns the value of the first matching widget. If the returned value is an obje - `sync: false`: prevents widgets from triggering synchronization and scripts - `script: false`: prevents scripts but not synchronization - `send: false`: prevents widgets from sending osc messages - - `external: true`: simulates a value coming from an osc/midi message + - `external: true`: simulates a value coming from an osc/midi message (implies `sync: false` automatically) Sets the value of the first matching widget. If `ìd` contains wildcards, affects all matching widgets **except** the emitting widget. diff --git a/src/client/widgets/scripts/script-vm.js b/src/client/widgets/scripts/script-vm.js index 5ad0f5ee..c7a6a583 100644 --- a/src/client/widgets/scripts/script-vm.js +++ b/src/client/widgets/scripts/script-vm.js @@ -87,7 +87,10 @@ class ScriptVm extends Vm { if (extraOptions.send === false) options.send = false if (extraOptions.sync === false) options.sync = false if (extraOptions.script === false) options.script = false - if (extraOptions.external === true) options.fromExternal = true + if (extraOptions.external === true) { + options.fromExternal = true + options.send = false + } var widgets if (id.includes('*')) {