Matrix get a single Value

first, OpenStageControl is a great tool!

a simple question to which I unfortunately cannot find an answer ... how can I get a single value of a Matrix with "Advanced Synthax" ( @ {MatrixID.?} ) or with Javascript ( get ("MatrixID" [? ]) )?

merci

Hi, i think that does not work this way, i replaced my matrix with a switch (and do the magic with OSC{} receive). It is maybe usefull if you have different types in your matrix...
You could tweak the props property, there u could use $ as index (e.g. something like here [SOLVED] Button Matrix not listening on address - #3 by benjaminauer)

If you experience problems i think you should investigate in a matrix with cloned objects (did not try that one).

Hope this helps..

thank you,
but .. i found a solution, how it works with the "matrix" widget:
#{
@{widgetID}[0 ... 3]
}
and now ... the next question in a row, how can i "set" a single Value in a Matrix from a other widget?

merci beaucoup
variables.json (6.3 KB)

Well done!
https://openstagecontrol.ammd.net/docs/widgets/scripting/

You have to use SET and in the script property and you should avoid "@{}" etc...
I don't have much experience on this, i just try it out atm....

The matrix' children's id are defined by default as "matrix_id/X" where X is the child's index. You can use the set() function in script properties (not advanced syntaxes) to change their value.

aaah ... the "slash" is the secret!
thank you so much, it works fine!

'by default' means, i can give each element a unique name and call them like this;
set ("matrixID/uniqueName", value)
?
cool ... how can i do that?

merci beaucoup

You can define the children's ids with the matrix' props property and use the $ variable in the JS{{}} / #{} syntaxes to make it depend on the children's indices. The best way to that is to define the whole property with a JS{{}} block, like in this example session: matrix_example.json (2.2 KB)

thanks a lot ... very helpful!