
Someone really did use it???
I keep it in my plugins.
http://forums.livecode.com/viewtopic.ph ... es#p100173
cool.

Simon
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on combineAndExport
get fld 1 -- or wherever your data is
repeat for each line l in it
put item 2 of l & cr after kArray[item 1 of l]
end repeat
-- export to files:
set the defaultfolder to specialFolderPath("Desktop") -- or wherever
repeat for each key k in kArray
put kArray[k] into url ("file:" & k & ".txt")
end repeat
end combineAndExport
Code: Select all
put the number of lines in kArray[k] into tCount
jacque wrote:I've kind of lost track of exactly what you need to do, but this may work and is shorter:
This doesn't do a count of each bin, but if you need that for some reason then this gets the number in each bin, after you've built the initial array:Code: Select all
on combineAndExport get fld 1 -- or wherever your data is repeat for each line l in it put item 2 of l & cr after kArray[item 1 of l] end repeat -- export to files: set the defaultfolder to specialFolderPath("Desktop") -- or wherever repeat for each key k in kArray put kArray[k] into url ("file:" & k & ".txt") end repeat end combineAndExport
I may have misunderstood the end goal though, so this may not be exactly what you're after.Code: Select all
put the number of lines in kArray[k] into tCount