ArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2011-03-09T11:12:16+02:00 https://brainmodular.com/forums/app.php/feed/topic/2767 2011-03-09T11:12:16+02:00 2011-03-09T11:12:16+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18547#p18547 <![CDATA[need help to make a script]]> Statistics: Posted by 23fx23 — 09 Mar 2011, 10:12


]]>
2011-03-09T09:13:47+02:00 2011-03-09T09:13:47+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18545#p18545 <![CDATA[need help to make a script]]>
No need to initialize SL1.Commatext right after Create either, it's empty anyway.

Statistics: Posted by bsork — 09 Mar 2011, 08:13


]]>
2011-03-09T03:42:49+02:00 2011-03-09T03:42:49+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18543#p18543 <![CDATA[need help to make a script]]>
sorry lol never mind about tstringlist ( a delphi script object, kind of array of strings, or simply what we call a 'list' used to manipulate commatexts and elements). I was more asking to some eventual scripter reader if would know how to deal with their length, but now i remember martignasse had conclued we had to fill them first with various or blank text, so here it may not adapt to arrayIn length if it changes over time, so it is 'pre-filled-formated' of 128 elements of blank text, then will replace the items by array values. (but then i don't see what would be the use of the funtion tstringlist.capacity..., something i felt strange..)

but you shouldn't worry att all about that to use it ;)

Statistics: Posted by 23fx23 — 09 Mar 2011, 02:42


]]>
2011-03-09T01:37:11+02:00 2011-03-09T01:37:11+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18541#p18541 <![CDATA[need help to make a script]]> thank you 23fx23
and if you can have a look on my second question i think it can be very usefull.
ps. i don't understand at all what Tstringlist.capacity is

Statistics: Posted by joffo78 — 09 Mar 2011, 00:37


]]>
2011-03-09T01:26:38+02:00 2011-03-09T01:26:38+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18540#p18540 <![CDATA[need help to make a script]]> here is one exemple, but it's a bit unclear for me how to dynamically alter tstringList lenghts (anyone?), so it has a fixed max capacity ( i don't understand the use of Tstringlist.capacity...)
you can easy edit if need more values.

CODE:

//////////////////////////// Array values &#40;INTEGERS&#41; to commaText/////////////////////////CONST MAX_ITEMS = 128;var ArrayIn, CommaOUT&#58; Tparameter;var SL1&#58; TstringList;/////////////////////////////procedure init;var i&#58; integer;begin  ArrayIn&#58;= CreateParam&#40;'ArrayIn', PtArray&#41;;  SetIsOutput&#40;ArrayIn,False&#41;; SetMin&#40;ArrayIn,0&#41;; setMax&#40;ArrayIn,MAXINT&#41;;  CommaOUT&#58;= CreateParam&#40;'CommaOUT',PtTextField&#41;;  setisINPUT&#40;commaOut,false&#41;;     SL1&#58;= Tstringlist.create;  SL1.commatext&#58;='';  for i&#58;= 0 to MAX_ITEMS -1 do begin SL1.add&#40;' '&#41;;end;END;//INIT///////////////////////////////////////////Procedure Callback&#40;N&#58;integer&#41;; var i, L&#58; integer;begin      if &#40;n=ArrayIn&#41; then begin         L&#58;= getLength&#40;ArrayIn&#41;;         if L< MAX_ITEMS then begin            For i&#58;= 0 to L-1 do begin               SL1.strings&#91;i&#93;&#58;= IntToStr&#40;trunc&#40;getDataArrayValue&#40;ArrayIn,i&#41;&#41;&#41;;            end;         //Strace&#40;SL1.commatext&#41;;         setStringValue&#40;CommaOut,SL1.commatext&#41;;       end;      end;END;//CB////////////////////////////////////////Procedure Destroy;beginSL1.free;end;///////////////////////////////

Statistics: Posted by 23fx23 — 09 Mar 2011, 00:26


]]>
2011-03-09T00:23:47+02:00 2011-03-09T00:23:47+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18536#p18536 <![CDATA[need help to make a script]]>
I'm working on a patch to make sequencial mouvements and i like to display some value of an array on a matrix module.
i like the approach of the script create comma text but i don't want to have to connect each output of the array on one integer to string and each integer to string on the create comma text entries .
more i have 120 value to connect.
So i wonder if someone could help me (or doing for me) a script which had one array input to get several value and make there a comma text.
thank you.

Statistics: Posted by joffo78 — 08 Mar 2011, 23:23


]]>
BrainModular BrainModular Users Forum 2011-03-09T11:12:16+02:00 https://brainmodular.com/forums/app.php/feed/topic/2767 2011-03-09T11:12:16+02:00 2011-03-09T11:12:16+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18547#p18547 <![CDATA[need help to make a script]]> Statistics: Posted by 23fx23 — 09 Mar 2011, 10:12


]]>
2011-03-09T09:13:47+02:00 2011-03-09T09:13:47+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18545#p18545 <![CDATA[need help to make a script]]>
No need to initialize SL1.Commatext right after Create either, it's empty anyway.

Statistics: Posted by bsork — 09 Mar 2011, 08:13


]]>
2011-03-09T03:42:49+02:00 2011-03-09T03:42:49+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18543#p18543 <![CDATA[need help to make a script]]>
sorry lol never mind about tstringlist ( a delphi script object, kind of array of strings, or simply what we call a 'list' used to manipulate commatexts and elements). I was more asking to some eventual scripter reader if would know how to deal with their length, but now i remember martignasse had conclued we had to fill them first with various or blank text, so here it may not adapt to arrayIn length if it changes over time, so it is 'pre-filled-formated' of 128 elements of blank text, then will replace the items by array values. (but then i don't see what would be the use of the funtion tstringlist.capacity..., something i felt strange..)

but you shouldn't worry att all about that to use it ;)

Statistics: Posted by 23fx23 — 09 Mar 2011, 02:42


]]>
2011-03-09T01:37:11+02:00 2011-03-09T01:37:11+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18541#p18541 <![CDATA[need help to make a script]]> thank you 23fx23
and if you can have a look on my second question i think it can be very usefull.
ps. i don't understand at all what Tstringlist.capacity is

Statistics: Posted by joffo78 — 09 Mar 2011, 00:37


]]>
2011-03-09T01:26:38+02:00 2011-03-09T01:26:38+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18540#p18540 <![CDATA[need help to make a script]]> here is one exemple, but it's a bit unclear for me how to dynamically alter tstringList lenghts (anyone?), so it has a fixed max capacity ( i don't understand the use of Tstringlist.capacity...)
you can easy edit if need more values.

CODE:

//////////////////////////// Array values &#40;INTEGERS&#41; to commaText/////////////////////////CONST MAX_ITEMS = 128;var ArrayIn, CommaOUT&#58; Tparameter;var SL1&#58; TstringList;/////////////////////////////procedure init;var i&#58; integer;begin  ArrayIn&#58;= CreateParam&#40;'ArrayIn', PtArray&#41;;  SetIsOutput&#40;ArrayIn,False&#41;; SetMin&#40;ArrayIn,0&#41;; setMax&#40;ArrayIn,MAXINT&#41;;  CommaOUT&#58;= CreateParam&#40;'CommaOUT',PtTextField&#41;;  setisINPUT&#40;commaOut,false&#41;;     SL1&#58;= Tstringlist.create;  SL1.commatext&#58;='';  for i&#58;= 0 to MAX_ITEMS -1 do begin SL1.add&#40;' '&#41;;end;END;//INIT///////////////////////////////////////////Procedure Callback&#40;N&#58;integer&#41;; var i, L&#58; integer;begin      if &#40;n=ArrayIn&#41; then begin         L&#58;= getLength&#40;ArrayIn&#41;;         if L< MAX_ITEMS then begin            For i&#58;= 0 to L-1 do begin               SL1.strings&#91;i&#93;&#58;= IntToStr&#40;trunc&#40;getDataArrayValue&#40;ArrayIn,i&#41;&#41;&#41;;            end;         //Strace&#40;SL1.commatext&#41;;         setStringValue&#40;CommaOut,SL1.commatext&#41;;       end;      end;END;//CB////////////////////////////////////////Procedure Destroy;beginSL1.free;end;///////////////////////////////

Statistics: Posted by 23fx23 — 09 Mar 2011, 00:26


]]>
2011-03-09T00:23:47+02:00 2011-03-09T00:23:47+02:00 https://brainmodular.com/forums/viewtopic.php?t=2767&p=18536#p18536 <![CDATA[need help to make a script]]>
I'm working on a patch to make sequencial mouvements and i like to display some value of an array on a matrix module.
i like the approach of the script create comma text but i don't want to have to connect each output of the array on one integer to string and each integer to string on the create comma text entries .
more i have 120 value to connect.
So i wonder if someone could help me (or doing for me) a script which had one array input to get several value and make there a comma text.
thank you.

Statistics: Posted by joffo78 — 08 Mar 2011, 23:23


]]>