Re: Need help with MS Word 2004 languages and dictionaries
Re: Need help with MS Word 2004 languages and dictionaries
- Subject: Re: Need help with MS Word 2004 languages and dictionaries
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 02 May 2005 13:01:09 -0700
On 5/2/05 11:25 AM, I wrote:
> For your second question, I think it would be too risky to try to coerce
> the string back to the language ID via 'run script', even using the 'name'
> string rather than the 'name local'.
If you wanted to do it, with no risk but less attractive user interface,
you'd simply make up the list of available languages with the lower-case
enumerations 'as string':
tell application "Microsoft Word"
set languageList to {}
try
set end of languageList to danish as string
end try
try
set end of languageList to german as string
end try
--etc
set chosenLanguage to item 1 of (choose from list languageList)
set chosenLaguageID to run script chosenLanguage -- gets the enumeration
back
end tell
Note that if you somehow needed to get the enumerations 'as string' out of
Word tell block, say writing to a text file or something, you first need to
preface all such manipulations with:
run script "tell application \"Microsoft Word\"
end tell"
..one of those strange peculiarities of AppleScript. Otherwise the export
constants appear as their «raw codes» instead of the English language
constants you expect.
--
Paul Berkowitz
_______________________________________________
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