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
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