I told my friend @BenRio about Open Stage Control and he jumped on it =D
Very interesting the possibility of using widget scripts to manipulate variables. Regarding this, instead of opening a new topic, I thought it wise to piggyback on this one.
Ben helped me write a python script that updates Ableton Live's clip list. This way I can get the name of any Ableton clip. For example: at the address "/clipname_tr0_0" I get the name of the first clip of the first track... And so on.
In my template I use a 4x4 session box (with 16 widgets ranging from clip_/0 to clip_/15).
In addition to a standard button to show the first 4x4 set of clips and tracks, I have "grid down" and "grid up" buttons.
As a starting point, I'll bring only the case of the clip_/0 widget (to later replicate to the others).
I'm trying to change the label property of the clip_/0 widget to toggle it between "/clipname_tr0_0" and "/clipname_tr0_4" in response to the "down grid" and "up grid" buttons.
For that, I have in clip 0:
id: clip_/0
label: @{cl_0_name}
And to make the switch I created the following widget script:
id: cl_0_name
address: /clipname_tr0_0
id: cl_4_name
address: /clipname_tr0_4
In the "down grid" button, I put it in scripting > onValue:
set("cl_0_name", get("cl_4_name"))
When I press "down grid", the widget clip_/0 successfully receives the name of the clip referring to /clipname_tr0_4, but the name lasts only a few milliseconds and returns the name of /clipname_tr0_0.
I have the impression that it is something very simple to do (without the need to write a module). I've tried other combinations with set, setVar... but I also got it wrong. I wonder if @jean-emmanuel has any suggestions.