|
Post by joebataz on Mar 14, 2019 3:53:13 GMT
FIRST; Nice stuff you've been showing xPsycHoWasPx!!!!! I have a global variable A_SetName which I populate with a bunch of strings, 32 to be exact. In a container List I have text objects LB0, LB1, LB2,...LB31. I want to stuff the strings into text objects so I'm trying to use decl s=sizeof(A_SetName); decl i; for(i=0;i<s;i++)setattribute(findobject('LB'+i),'content',A_SetName);
but I can't get the text in red to work. ??HELP??? TIA!! joeb
|
|
|
Post by joebataz on Mar 14, 2019 4:01:28 GMT
couldn't get my code posted because square bracket i square bracket switches text into italic DUHHHHHHHHHHHHHHhhhhhhhhhhh so I changed it to
decl s=sizeof(A_SetName); decl x; for(x=0;x<s;x++)setattribute(findobject('LB'+x),'content',A_SetName[x]);
|
|
|
Post by xPsycHoWasPx on Mar 14, 2019 10:10:54 GMT
Nice stuff you've been showing xPsycHoWasPx!!!!! Your welcome use the "Insert Code" button when posting lemur codes. and u won't run into italic and bold stuff. like I changed your thread 2. just easier to see codes from normal writing. also if your problem is about looping a "setattribute" I would recommend you use that as question in your title and not "Simple stuff (if you remember the silly syntax)"title says 0 what your thread/problem is about. Problems with looping(for) "setattribute"
or whatever.. if your post was on a forum with +2000 threads it would quickly be overlooked, of course stuff is hard to overlook here at our current state. but please consider more close to the subject "titles". then if other ppl have same issue as you and goto the forum, and they see Problems with looping(for) "setattribute" they will be like oh that's exactly my problem 2. and just read the thread instead of posting a new , that just asks the same question somebody already asked and got answer for. about your code: decl s=sizeof(A_SetName); decl x;
for(x=0;x<s;x++)setattribute(findobject('LB'+x),'content',A_SetName[x]); A_SetName does this contain text strings or ascii numbers that is converted to text by other scripts (I seen some of your scripts so I know u used ascii to text scripts somewhere along the way) that method will only work if text strings. like {'Item1','Item2''Item3','Item4','Item5','Item6'} if its ascii numbers/letters then it won't loop like u think but instead take letter 1, put it into LB0 then letter 2 into LB1 ect. else the syntax should be right.
|
|
|
Post by joebataz on Mar 14, 2019 13:25:12 GMT
Point taken on titles! I actually have 2 array A_SetName and A_Set. A_SetName is an array of text strings of up to 12 characters which is the name of a corresponding array of integers. A_Set holds the integer pairs that I send to my DMX box. This pair, A_SetName:A_Set go into a list of 32 text triplets. Let me explain. My original app had a page that used this list as a sequencer. Instead of arrays of integers it had 2 columns of single integers and a name column as in: NAME | BANK | PRESET
| BLUE | 1 | 1 | GREEN | 1 | 3 | RED_BLU_WASH | 4 | 1 | PINK_MIRRBAL | 9 | 7 |
total of 32 rows I have all the code to move around, duplicate lines, auto run by MIDI clock, etc. in the window with the list. 32 rows was never enough for an entire song when I needed 3 or 4 rows to create a "look" with the lighting. Now that I have the code to execute 6 of the pairs in one row (thanks for the help there) I can have 32 "looks" in one sequence list as in:
TIME | NAME | SET | 00:00:18 | BLUE | {1,1,2,3,7,2,9,1,99,99,99,99} | 00:00:59 | GREEN AMBER
| ... | ...
| ... | 00:04:12 | FADEOUT | {1,1,99,99,99,99,99,99,99,99,99,99} |
total 32 rows And each sequence can be stuffed into a "song" array of 32. The 2 things that have always held me back have been the reliable execution of a "set" of presets and the ability to name things on the fly. I built a Namer page which has a multi-level fader of 12 sliders. Using my convertDev() function I can come up with a 12 character string that I can save as a set name or a song name to save these sequences. Once again thanks for all the help and I will address the titling issue in the future. joeb
|
|
|
Post by joebataz on Mar 14, 2019 13:45:04 GMT
whoops, lost the second row set?
|
|