Parsing CSV File VIA Array? (Part II)
JOHN PATTEN
johnpatten at me.com
Sun Feb 9 00:12:32 EST 2014
(Part II of MSG)
Here’s the script I’m using:
on mouseUp
put 1 into tTargetLine
repeat for number of lines in cd fld "itemHold"
get line tTargetLine of cd fld "itemHold"
repeat with y = 1 to the number of items of it
put item y of it into counterArray[item y of it][y]
end repeat
put the keys of counterArray into cd fld "Group2"
-- my error is in here when I begin the subsequent loops i think as the array continues to add elements
repeat with x = 1 to the number of lines in cd fld "group2"
put line x of cd fld "group2" into tElement
put 0 into tCounter
repeat for each element thisElement in counterArray[tElement]
put thisElement & return after cd fld "group3"
add 1 to tCounter
end repeat
put "," & tCounter after line X of cd fld "group2"
put "" into cd fld "group3"
end repeat
put return after cd fld "group2"
add 1 to tTargetLine
end repeat
end mouseUp
I’m afraid I’m making this more complicated than it has to be. Any suggestions?
Thank you!
More information about the use-livecode
mailing list