Example of script triggered by value rather than by LinkId?

I would like to execute some script according to some value (but not over linkId, a situation for which there’s already some example in another thread. The documentation tells this:
"condition : When the widget receives a value, if this property return a falsy value, the script property won’t be evaluated. If it’s non-falsy, it will be evaluated normally. Formulas are given one extra variable in this context:

  • value : the value received by the widget".

However I still don’t understand how to pass this value to the widget. A simple example would be useful. By the way, it would be nice to have more examples in the docs globally.

From https://openstagecontrol.ammd.net/docs/widgets-reference/#script :

value or linkId properties can be used to receive other widgets' values. The value property must actually change to trigger the execution, where linked widgets via linkId can submit the same value over and over and trigger the execution

You could for instance set the script's value property to @{widget_id} to make it receive the value from widget "widget_id"

So any change in the value would trigger the whole script, even if the @{widget_id} is in the middle of the script?

The presence of @{widget_id} in the script property does not link the script execution to the widget’s value, you need to put it in the script’s value property.