Hear ya! I thought that now with the string functions I might be able to pull it off!
Although, now that I look what I was trying to do with a fresh eye it makes sense that it wouldnt work. I think we need to request a getexpression() function for containers or the unification of "object" (actual reference of an object) with "name" (the name of an object described with string)
Thanks!
edit: OK, I getexpression(container, k) with a custom expression and it works...This will probably do what I want it to do.
The other reason I have been using Monitor objects is that you can instantiate them to longer arrays than regular variables inside the Lemur Windows Editor. The way the editor counts bytes in an array is different between the two, although it shouldn't be different.
I saw this thread and think I'm having a similar problem. Please bear with me as I am very much a newbie when it comes to both coding & lemur
I have a set of vectors inside a container e.g s1,s2,s3,s4,s5....s16 .
What i want to do is change every [n] element across some of these vectors, for example,i may want to change s1[2],s5[2],s9[2],s13[2] all to the same value.How do I reference 's' + 'x' and [n] ,where 's' is the vector's name ,'x' is the numerical suffix of the vector's name and [n] is the element in the vector I want to change?
Is this possible?
No I have a set of vectors:
vector 1:0,0,0,0,0,0,0
vector2:0,0,0,0,0,0,0
vector3:0,0,0,0,0,0,0
vector4:0,0,0,0,0,0,0
etc ...
I would like to be able to change the nth element of all chosen vectors, in a repetitve way. In other words a script that will refer to Vector 'X' [n] and then I can repeat through the script changing the X value to address the different vectors. So if X starts as 1, increasese in increments by 1 and position [2] is assigned a value of 4 the final product would be:
vector 1:0,0,4,0,0,0,0
vector2:0,0,4,0,0,0,0
vector3:0,0,4,0,0,0,0
vector4:0,0,4,0,0,0,0
I know that I can use loops to repeat through an array changing values, but I don't know how or if you can loop through different expressions/vectors.
Ooooh that was a bit tricky! Here's one way to pull it off! Not sure its the best one - I only fiddled with it for 10 minutes. use the Pads to change an nth position of all vectors. The monitors display the 4 example vectors.
ah! thank you so much for the help Softcore. I'll have a look at what you've done.
It seems im using a lot of trial and error with my scripting at the moment. Im especially getting knotted up with loops and making sure the braces are in the right place.