[OT] reOrdering text

Robert Sneidar slylabs13 at me.com
Wed Jan 16 13:47:25 EST 2013


Without looking at any other solutions first:

repeat with i = 1 to the number of lines of myText step 3
put line i+1 into templine
delete line i+1 of myText
put tempLine & cr before line i of myText -- not sure if you need the cr

bob


On Jan 16, 2013, at 7:06 AM, Richmond wrote:

> I have a socking great text file that reads in part something like this:
> 
> Cook my cheese
> fishface1
> finish
> Shave my legs
> fishface2
> finish
> Paint my fingernails
> fishface3
> finish
> Wax my arms
> fishface4
> finish
> 
> and so it goes for about 72 pages (!!!)
> 
> Now what I needs is a reordered lilst like this:
> 
> fishface1
> Cook my cheese
> finish
> fishface2
> Shave my legs
> finish
> fishface3
> Paint my fingernails
> finish
> fishface4
> Wax my arms
> finish
> 
> and, as a fairly lazy slob, I have no great wish to effect that manually.
> 
> But, for the life of me I cannot work out how to do that automatically, either inwith or outwith Livecode.
> 
> Richmond.
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list