Hi snop21,
really not sure what your problem is:
Adding QUOTE to every line of your variable?
Turning a CR delimited list into a SPACE delimited list?
Explain what you want to do to yourself and you will surely
be able to translate it to "Livecode"!
Best
Klaus
P.S.
Looking at your last postings, I think you need some hints concerning repeat loops!
1. repeat with...
Code: Select all
...
repeat with i = 1 to the num of lines of fld XYZ
## do something with line i of fld XYZ
## LC does the counting for you when using "repeat with ..."
## So this is completely unneccessary:
## add 1 to i
end repeat
...
2. repeat for each line/item etc... tLine in tList
Here LC will NOT count the lines, that's why this is so fast, so If you need to "track" the linenumber
you need to add a counter and raise it in every loop
This loop is READ ONLY, means you CANNOT modify tLine in the loop!
Code: Select all
...
set itemdel to TAB
## Optional:
put 1 into tCounter
repeat for each line tLine in tList
## BAD, will give HIGHLY UNEXSPECTED RESULTS:
## put 22 into item 1 of tLine
## Do this -> use a variable with the content of tLine and modify that instead:
put tLine into tLine2
put 22 into item 1 of tLine2
put tLine2 & CR after tNewList
## Optional
add 1 to tCounter
end repeat
...