Title: Re: Shameless request for script
On 11/16/00 1:14 AM, "Michael W. Wellman" <[EMAIL PROTECTED]> wrote:
>> set theCategories to (name of every category)
>> try
>> set theCategories to order list theCategories -- Akua Sweets
>> end try
>
>
> Hey Paul, I'm feeling especially lazy at the moment...
>
> Does Akua Sweets have a "unique order list" command? In other words, one
> which returns an ordered list containing only one of each entry (if there
> were duplicates in the original list)?
>
> mikel
>
Yup, ‘order list theList with removal of duplicates’, plus a lot more:
order list : Sort a list (or lines of text), optionally removing duplicates. All parameters are valid for list sorts, only the parameters from “as” on are for text sorts.
order list a list of anything -- A list of text items, numbers or just text with lines to sort.
[synchronizing a list of list] -- A list of lists that should be kept in the same order. They must be EXACTLY the same length as the source list. Sublists are not synchronized.
[with class order a list of type class] -- A list of the ordering of classes you prefer. E.g. {integer, real, string} to sort integers at head of list.
[with recursion depth small integer] -- The maximum depth to recurse into sub-lists.
[with sublist weight a list of small integer] -- A list that determines how sublists are sorted in their parent. E.g. {3,4,1} will sort on the 3rd item of sublists, then the 4th, then the first. Default is {1,2,3…}
[removal of duplicates boolean] -- Remove equal items? Default is FALSE.
[with sublist description a list of list] -- For complex sorts - a list of lists in the form of each sublist of the master list to be sorted, containing {weights, itemDesc, itemDesc...}. Each itemDesc can be another sublist description, or {as, in language, case sense} to define how the field shou
[as type class] -- The class to coerce all items to when sorting. Default is natural class (e.g. numbers ahead of strings). For text sorts, only one type is allowed. The text found will be coerced to this type. e.g. as integer will sort on values.
[by string] -- The delimeters to skip to the item to sort by. E.g. "1,2,3,4" by ",," will sort on the third item (two commas are passed). ‘by 8’ will sort from 8th character on.
skipping string -- Things to be skipped before looking for an End-Of-Line (i.e. If you have tab delimited text, and some fields are multiple lines, include the number of fields per record as tabs - e.g. tab & tab & tab for 4 fields) Of course this won’t work if the last fie
[in language point] -- Use international text comparison {Script, Language} instead of default ASCII - use {0,0} to avoid ASCII sort and use System’s International Sort.
[case sensitivity boolean] -- Should upper/lower be different? Default is FALSE.
[reversal boolean] -- Reverse order?
[within range point] -- The first/last items to be sorted. Default is {1, -1}.
Result : anything -- The list (or text) now sorted.
--
Paul Berkowitz
- Archiving via mailbox Bruce Sanderson
- Re: Archiving via mailbox Allen Watson
- Re: Archiving via mailbox Bruce Sanderson
- Re: Archiving via mailbox Allen Watson
- Shameless request for script David Leitch
- Re: Shameless request for script Paul Berkowitz
- Re: Shameless request for scrip... Michael W. Wellman
- Re: Shameless request for s... Paul Berkowitz
- Re: Shameless request for scrip... George Clark
- Re: Shameless request for script Andrew R. Schmiechen
- Re: Shameless request for scrip... Paul Berkowitz
- Re: Shameless request for scrip... Allen Watson
- Re: Shameless request for s... Andrew R. Schmiechen
- Re: Shameless request f... Word.Net
- Any Apple Scripters up ... Word.Net
- Re: Any Apple Scripters... George Clark
- Re: Any Apple Scripters... Word.Net
- Re: Any Apple Scripters... Bryan Harris
