Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get the index of a word in a textFrame

Status
Not open for further replies.

Scubilion

Programmer
Apr 10, 2007
9
FR
Hello,
First, I'm french user of Indesign CS3, so excuse me for my bad english.
I'd like to get the index of a word in a textFrame when the selection is an insertion point that is placed in a word. I tried this in javascript (I suppose there is a textFrame that containts some texts):
var mySelection = app.selection[0]
if (mySelection.constructor.name = "insertionPoint"){
SelIndex = mySelection.words[0].index}
SelIndex give me the index of the insertionPoint, but not the index of the word in which the insertionPoint is.
What happen ?
I'd like to get the index of the word in the textFrame or the Story.
Thanks for your help.
Fr. Scubilion
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top