... including URL and other Internet Web site references, is subject to change. without notice. ... does not give you any license to these patents, tr
Document source : download.microsoft.com
Proofing Suite
497
You can check the value of the meaning count property to prevent potential errors in your code. The
following example returns a list of synonyms for the second meaning for the word or phrase in the
selection and displays these synonyms in a message box.
set synInfo to get synonym info object item to check content of selection ¬
language id english us
if meaning count of synInfo 2 then
set synList to get synonym list from synInfo meaning index 2
repeat with i in synList
display dialog i
end repeat
else
display dialog "There is no second meaning for the selection."
end if
Properties
antonyms
Returns a list of antonyms for the word or phrase. The list is returned as an array of strings.
Read-only.
context
Returns the word or phrase that was looked up in the thesaurus. Read-only.
The thesaurus will sometimes look up a shortened version of the string or range used to return
the synonym info object. The word property allows you to see the exact string that was used.
found
True if the thesaurus finds synonyms, antonyms, related words, or related expressions for the
word or phrase. Read-only.
meaning count
Returns the number of entries in the list of meanings found in the thesaurus for the word or
phrase. Returns 0 (zero) if no meanings were found. Read-only.
Each meaning represents a unique list of synonyms for the word or phrase. The lists of related
words, related expressions, and antonyms aren't counted as entries in the list of meanings.
meanings
Returns the list of meanings for the word or phrase. The list is returned as an array of strings.
Read-only.
The lists of related words, related expressions, and antonyms aren't counted as entries in the
list of meanings.
Summary :
set synInfo to get synonym info object item to check content of selection ¬ language id english us if meaning count of synInfo 2 then set synList to get synonym list from synInfo meaning index 2 repeat with i in synList display dialog i end repeat else display dialog "There is no second meaning for the selection."
Tags :
word,meaning,phrase,meanings,related,returns,readonly,antonyms,thesaurus,synonyms,words,syninfo,found