Reset the script widget value to accept the same value again

Hi, is it possible to set, at the end of the script execution, the value of the script widget itself so it can run again if the same value comes in again ?

Example :

I tried this code but didn’t work for the widget itself

//do some stuff with the value
set('this', 'wait for new values')

Or maybe there is another way to run the script widget again with the same value coming in ?

Thanks in advance for your help.

Value changes triggered by property updates (typically a @{widget_id} statement) are ignored when the result is the same, however the following cases are not subject to this limitation:

  • linkId linking
  • incoming osc message
  • set() function called from a script

I’ve just tried with the set() function from another script (‘test’ widget in the video below), I also try directly sending a new OSC message (not on the video). Nothing’s working. What am I missing ?

Here is short 30sec video of screen recording showing the behavior of the system.

More infos : the goal I’m trying to achieve is sending an OSC message from a control backend to set the values of many widgets after they’ve been modified (‘played with’) and very often it can be the same value twice in a row.

You should not use /EDIT to set a widget’s value (property change = same value ignored, as explained above), simply send the value to the widget’s address and it will affect its value state. A subtle difference I’ll try to outline in the docs… :slight_smile:

Ok thank you, it just clicked. Finally understood everything you told me those days and now it’s working perfectly ! That’s awesome :rocket:

1 Like