Rép: Accessing Localized File Menu String
Rép: Accessing Localized File Menu String
- Subject: Rép: Accessing Localized File Menu String
- From: Yvan KOENIG <email@hidden>
- Date: Fri, 10 Jul 2009 09:54:22 +0200
Le 9 juil. 2009 à 21:51, Ian was here a écrit :
I have an AppleScript that clicks a menu item under Keynote's file
menu. This works great. The problem is when I localize it.
The working version of the script is as follows:
if (exists menu item "Export…" of menu 1 of menu bar item "File"
of menu bar 1) then click menu item "Export…" of menu 1 of menu
bar item "File" of menu bar 1
The localized version is this:
set localizedFileString to localized string "File"
set localizedExportString to localized string "Export…"
if (exists menu item localizedExportString of menu 1 of menu bar
item localizedFileString of menu bar 1) then click menu item
localizedFileString of menu 1 of menu bar item localizedFileString
of menu bar 1
"Export" is in Keynote's dictionary and will translate to German,
but "File" is not in Keynote's dictionary and won't translate. Does
file belong to the Finder? What I want to know is how to translate
"File" so that I can use it in my localized AppleScript.
Thank you.
Why are you using the name of the menu?
I use the index.
if (exists menu item localizedExportString of menu 1 of menu bar item
3 of menu bar 1) then click menu item localizedFileString of menu 1
of menu bar item 3 of menu bar 1
Yvan KOENIG (from FRANCE vendredi 10 juillet 2009 09:51:03)
_______________________________________________
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