• 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: uh, that's so cool! AS 1.9.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: uh, that's so cool! AS 1.9.1


  • Subject: Re: uh, that's so cool! AS 1.9.1
  • From: Mike Fischer <email@hidden>
  • Date: Sat, 21 Dec 2002 07:19:37 +0100

Hi Chris,

Am Samstag, 20.12.02 um 15:30 Uhr schrieb "Chris Espinosa" <email@hidden>:

"Mike Fischer" <email@hidden> wrote:
How are localized names handled?

Good news and bad...

The bad is that the underlying system functionality (new in Jaguar) that
makes this possible does not store or reveal the "unlocalized" names of any
elements. So scripts that use names to refer to menus, butons, fields, etc.
must use the local-language name. As you point out you can use the localized
string feature of AppleScript Studio to make this easier, but in general a
compiled script that uses names in one language will fail on systems that
aren't set to that language.

That's what I suspected. Oh well...


The good news is that every element is accessable by index as well as name,
and in most cases the index doesn't change from one run of the application
to another. So you could rewrite the "my do_menu" subroutine above to take
index numbers instead of strings. It's more tedious to write and harder to
read, but much more portable.

Well, better than nothing. At least this way localization independent scripts can be written.

Although IIRC the name of a bundled application can be localized as well (look at the standard Calculator.app for an example). That'd be something that can't be solved using an index. But I guess there are other solutions for this (like finding the application by its generic name first and then determining the localized name).


Chris

Thanks for the information and happy holidays!

Mike
--
Mike Fischer Softwareentwicklung, EDV-Beratung
Schulung, Vertrieb
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Subject: Re: Script Editor 2.0
  • Next by Date: Re: Script Editor 2.0
  • Previous by thread: Re: Keystroke [ Was: uh, that's so cool! AS 1.9.1]
  • Next by thread: Calling Dr. Staley, Dr. Haesler, Dr. Staley
  • Index(es):
    • Date
    • Thread