Page 2 of 2

Re: Building an EXE -- need help

Posted: Tue Dec 23, 2014 6:27 pm
by Simon
WOW :shock:
Someone really did use it???
I keep it in my plugins.
http://forums.livecode.com/viewtopic.ph ... es#p100173

cool.:)

Simon

Re: Building an EXE -- need help

Posted: Tue Dec 23, 2014 8:02 pm
by jacque
I've kind of lost track of exactly what you need to do, but this may work and is shorter:

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
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

 put the number of lines in kArray[k] into tCount
I may have misunderstood the end goal though, so this may not be exactly what you're after.

Re: Building an EXE -- need help

Posted: Tue Dec 23, 2014 11:02 pm
by PoLyGLoT
Your code looks very promising, Jacques. Especially that export code at the end! I will definitely try it out later! It seems like it will fit my purpose!
jacque wrote:I've kind of lost track of exactly what you need to do, but this may work and is shorter:

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
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

 put the number of lines in kArray[k] into tCount
I may have misunderstood the end goal though, so this may not be exactly what you're after.