sorting html text with arrays

Jim Ault jimaultwins at yahoo.com
Tue Oct 5 15:09:23 EDT 2010


This can be done depending on the text of each line.
Can you provide examples of the lines you want to sort?


On Oct 5, 2010, at 11:40 AM, Mark Swindell wrote:

> I'm using the following script to create a glossary/word list of all  
> words appearing in a songbook I'm making in Apple's Pages word  
> processor (over 2,000 unique words).   (Thanks to Phil Davis for his  
> help with arrays.)
>
> What I am wondering is if the formatted text can be retained in a  
> case like this, and how.  My attempts so far have failed, as the  
> htmlText tags are included in the sort... not what I want.)  I'd  
> like to be able to paste in from the word processor and do the sort  
> while maintaining formatting (bold, font, font size), and then be  
> able to take that result and copy and paste it back into the word  
> processor.
>
> Am I asking too much?
>
> Thanks
> Mark
>
> on mouseUp
>   repeat for each word tWord in tStripEm
>        add 1 to aWordCounts[tWord]
>   end repeat
>   put the keys of aWordCounts into tList
>   sort lines of tList
>   put tList into field "sorted3"
> end mouseUp

Jim Ault
Las Vegas






More information about the use-livecode mailing list