diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index afa78142..9050e100 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -99,7 +99,7 @@ class Widget extends EventEmitter { 'When prefixed with >>, the `linkId` will make the widget act as a master (sending but not receiving)', 'When prefixed with <<, the `linkId` will make the widget act as a slave (receiving but not sending)' ]}, - script: {type: 'script', value: '', help: 'Script executed whenever the widget\'s receives the defined event. See documentation.'}, + script: {type: 'script', value: '', help: 'Script executed whenever the widget\'s value updates. See documentation.'}, _osc: 'osc', diff --git a/src/client/widgets/scripts/script.js b/src/client/widgets/scripts/script.js index 9ce9d159..69dea213 100644 --- a/src/client/widgets/scripts/script.js +++ b/src/client/widgets/scripts/script.js @@ -19,7 +19,7 @@ class Script extends Widget { _script: 'script', event: {type: 'string', value: 'value', choices: ['value', 'keyboard'], help: 'Define which events trigger the script\'s execution.'}, - script: {type: 'script', value: '', help: 'Script executed whenever the widget\'s receives the defined event. See documentation.'}, + script: {}, _eventKey: 'event: keyboard', @@ -35,7 +35,9 @@ class Script extends Widget { '_geometry', 'left', 'top', 'width', 'height', 'expand', '_style', 'colorText', 'colorWidget', 'colorFill', 'colorStroke', 'alphaStroke', 'alphaFillOn', 'alphaFillOff', 'padding', 'css' - ]) + ], { + script: {type: 'script', value: '', help: 'Script executed whenever the widget\'s receives the defined event. See documentation.'}, + }) }