Finding only the words at a selection point
i beginning put javascript enable me place words in document dictionary , struggling understand relationship between indesign object word , words method , how else might find words within text object @ selection level.
select "grapes" run
app.selection.constructor.name returns "word"
app.selection.contents returns "grapes"
select "grapes,"
app.selection.constructor.name returns "text"
app.selection.words[1].contents returns "grapes," not grapes.
any punctuation attached word in selection other whitespace appears considered part of word in words collection.
short of resorting regex, there away return word?
tia
More discussions in InDesign Scripting
adobe
Comments
Post a Comment