Re: Number to words [Re: Excel & AppleScripting]
Re: Number to words [Re: Excel & AppleScripting]
- Subject: Re: Number to words [Re: Excel & AppleScripting]
- From: Shane Stanley <email@hidden>
- Date: Fri, 12 Feb 2010 09:46:53 +1100
- Thread-topic: Number to words [Re: Excel & AppleScripting]
On 12/2/10 8:22 AM, "Nigel Garvey" <email@hidden>
wrote:
> I wanted to include Australian too, but wasn't sure where all the
> "dinkum"s went. ;)
You just return result & ", mate!" :-)
>
>> current application's NSNumberFormatter's
>> localizedStringFromNumber_numberStyle_(287654321, current application's
>> NSNumberFormatterSpellOutStyle)
>
> Pah! Where's the scripting in that?
Well how about this?
set myLocale to current application's NSLocale's alloc()'s
initWithLocaleIdentifier_("IT")
set aFormatter to current application's NSNumberFormatter's alloc()'s init()
tell aFormatter
setLocale_(myLocale)
setNumberStyle_(current application's NSNumberFormatterSpellOutStyle)
set theString to stringFromNumber_(87654321)
end tell
--> ottantasette milioni seicentocinquantaquattromila trecentoventuno
Now that as a script could waste an evening...
--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden