• 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: International number formats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: International number formats


  • Subject: Re: International number formats
  • From: Kevin Meaney <email@hidden>
  • Date: Fri, 25 Feb 2005 14:27:50 +0000

G'day Brennan,

There might also be an issue relating to the version of the OS. A guy writing scripts for iMagine Photo had problems with a script that he wrote for one of his customers on 10.2.8.

It is a slightly different issue but it was to do with converting floats to integers:

On Panther and Jaguar 10.2.5 the following worked just fine:

set theFloat to 10.2
set theInt to theFloat as integer

But running 10.2.8 this would fail stating that the coercion failed. This also returns the same error code -1700.

I just thought I better mention it just in case your running 10.2.8 as your problem and the above one could add to making life difficult for working out what is going on.

Kevin


On 25 Feb 2005, at 13:45, Brennan wrote:

On 25/2/05 at 09:17, Bernardo Hoehl <email@hidden> wrote:

Hi Brennan,


I face the same questions here.

We, in Brazil use commas for decimals and periods for thousants too.

And most of my maths apps tend to result in error at the first time run
and require my attention.


I looked up system preferences dictionary, and there isn't much info
there.

I was wondering if there is a lower level system access I could use to
change the number formats in system preference's international pane.

One work around would be dettecting the settings > alerting the user >
changing the formats to what I need.

But how?

Well I suppose something like this

try

  "0.0" as number

on error msg number n

  if n is -1700 then

    .. non 'English' settings, do something

  end if

end try


Is there an accepted/preferred/reliable method for tweaking system preferences with AppleScript? I assume it requires messing with plists, because the "system preferences" dictionary doesn't have a full object model.

The ideal solution would be for Applescript to offer something like

using decimal seperator "."

  -- blah blah blah

end using decimal seperator

I suppose it's worth posting an enhancement request for this.

Brennan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: International number formats (From: Brennan <email@hidden>)

  • Prev by Date: Re: International number formats
  • Next by Date: Re: International number formats
  • Previous by thread: Re: International number formats
  • Next by thread: Re: International number formats
  • Index(es):
    • Date
    • Thread