Hello,
I'm having some issues finding a solution to my problem, i'm sure it is very easy but I'm not very good at scripting.
Let's say I have 5 ASCII objects with some value like value1, value2 etc.. I would like to take these values and use math.random function to "scramble" them randomly and write the randomly scrambled values into another set of 5 ASCII objects. Is something like that possible? Also the values cannot repeat, same value cannot be assigned to two of the new scrambled ASCII objects.
EDIT: Also separate question, is there a way to let's say I have ASCII group objects with values, in script i'd like to grp.getvalue them to val1, val2, val3 etc.. and after that use some cycle function to do the random scramble operation above? How would I make it so the cycle knows to move val1 to val2? Let me show example script which might make it more clear but definitely will NOT work.
val1 = "val1"
val2 = "val2"
val3 = "val3"
for (i=1, i<= 3, i++) do
val[i] = grp.write('1/1/[i]')
end
Basically this is exactly what I need to do with the first question above about scrambling them. I'd like to take val1,val2,val3 and randomize those values into 3 group addresses 1/1/1, 1/1/2, 1/1/3 without val1,val2 or val3 repeating in any of those 3 group addresses.
Sorry I know it makes no sense scripting wise but that's what I need to do.
Thank you in advanced!
I'm having some issues finding a solution to my problem, i'm sure it is very easy but I'm not very good at scripting.
Let's say I have 5 ASCII objects with some value like value1, value2 etc.. I would like to take these values and use math.random function to "scramble" them randomly and write the randomly scrambled values into another set of 5 ASCII objects. Is something like that possible? Also the values cannot repeat, same value cannot be assigned to two of the new scrambled ASCII objects.
EDIT: Also separate question, is there a way to let's say I have ASCII group objects with values, in script i'd like to grp.getvalue them to val1, val2, val3 etc.. and after that use some cycle function to do the random scramble operation above? How would I make it so the cycle knows to move val1 to val2? Let me show example script which might make it more clear but definitely will NOT work.
val1 = "val1"
val2 = "val2"
val3 = "val3"
for (i=1, i<= 3, i++) do
val[i] = grp.write('1/1/[i]')
end
Basically this is exactly what I need to do with the first question above about scrambling them. I'd like to take val1,val2,val3 and randomize those values into 3 group addresses 1/1/1, 1/1/2, 1/1/3 without val1,val2 or val3 repeating in any of those 3 group addresses.
Sorry I know it makes no sense scripting wise but that's what I need to do.
Thank you in advanced!