Re: Ordinal Numbers (1st, 2nd, etc.)
Re: Ordinal Numbers (1st, 2nd, etc.)
- Subject: Re: Ordinal Numbers (1st, 2nd, etc.)
- From: Jason Bourque <email@hidden>
- Date: Sat, 18 Aug 2001 19:52:01 -0400
On 8/18/01 3:36 PM, "Greg Back" <email@hidden> wrote:
>
> At 12:03 PM -0400 18/08/01, Arthur J Knapp wrote:
>
>> (My excuse? Well, you see, on my planet, 101 would be "One Hundred
>
>> and Oneth"... )
>
>
>
> Really?!?!?! What planet are you writing from? In the higher
>
> latitudes of the Americas it's "One Hundred and First" (which will
>
> soon be the ordinal for some post in this thread). Does this mean we
>
> need both Oxford and Webster versions of the handler? Or a dialog in
>
> which to make the choice, eh? :-)
>
>
As I said before, SPEED is the key issue here. If you really want to know,
>
>
-------------->SCRIPT ;)
>
>
tell application "Outlook Express"
>
set numberOfPosts to (count of (messages in folder "Applescript" of folder
>
"Inbox" whose subject contains "Ordinal Numbers (1st, 2nd, etc.)"))
>
end tell
>
>
addNumericSuffix(numberOfPosts) -- This is Nigel's version!!! (I think-
>
there are way too many different versions)
>
>
on addNumericSuffix(thisNum)
>
set {tens, units} to {thisNum mod 100 div 10, thisNum mod 10}
>
if units is in {1, 2, 3} and tens is not 1 then
>
item units of {"st", "nd", "rd"}
>
else
>
"th"
>
end if
>
return "" & thisNum & result
>
end addNumericSuffix
>
>
-->39th (After Bill's)(By my count, I'm on digest)(I think. I might have
>
lost count)(Too bad I couldn't actually USE this script.)
>
>
-------------->END SCRIPT
>
>
Could someone actually run this script and figure out using AS. Digest mode
>
isn't kind to those trying to find messages. =(
>
>
Greg
When you run this run it from the script menu and it will be dramatically
faster.
Jason Bourque