txt file to coll
Hi there,
I'm trying to load a list from a .txt file into coll through the [text] object, my problem is that the list in the text file is a simple list seperated by new lines,
eg
red
blue
green
purple
I can load this into the [text] object but to get it into coll I need to add the appropriate numbers commas and semi colons
eg
1, red;
2, blue;
3, green;
4, purple;
Is there a simple way to do this, I thought of scrolling through the lines with a counter and using pack to add the numbers but i cant add the comma that way.
Any help would be massively appreciated,
Thanks
Jack
Bang 'query'.
you could also try this...
put
red
blue
green
purple
in a file called txt.txt and living in max's searchpath
jack Keenan schrieb:
> Is there a simple way to do this, I thought of scrolling through the
> lines with a counter and using pack to add the numbers but i cant add
> the comma that way.
but coll will do it for you, if you send coll the packed data it will
store it. Then you can write the coll data to disk or open coll and see
the magic happened...
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
Thanks so much for all your help, I really appreciate you taking the time to help me on this.
I got it working last night, albeit in a rather hacky version which gradually worked through line by line, your solutions are far more efficient and elegant, and should speed up my patch a great deal.
Now I seem stuck with another problem the text object seems to keep breaking on me, i think i may have a patch named [text] somewhere in max's search patch which keeps loading in instead of the text object, could that be the case? It seems to repair itself if i remove ./patches from the search path and restart.
Thanks again for your advice
Jack
Found the offending patch, all text problems solved!!