• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Number to words [Re: Excel & AppleScripting]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Number to words [Re: Excel & AppleScripting] (From: "Nigel Garvey" <email@hidden>)

  • Prev by Date: Re: Number to words [Re: Excel & AppleScripting]
  • Next by Date: Ho w to add a global tempalte in word 2008 using Applescript
  • Previous by thread: Re: Number to words [Re: Excel & AppleScripting]
  • Next by thread: RE: Unable to open Word Mac documents in Hidden state
  • Index(es):
    • Date
    • Thread