Building an EXE -- need help

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Building an EXE -- need help

Post by Simon » Tue Dec 23, 2014 6:27 pm

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

cool.:)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Building an EXE -- need help

Post by jacque » Tue Dec 23, 2014 8:02 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

PoLyGLoT
Posts: 105
Joined: Sat Jan 14, 2012 12:37 am

Re: Building an EXE -- need help

Post by PoLyGLoT » Tue Dec 23, 2014 11:02 pm

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.

Post Reply