Question
How to find the paragraph and line numbers [CS3] [JS]
Hello,
I have a script that finds certain text formatting. Rather than having the script select all the instances of this text I have an alert that lists the page number and the contents for each found instance. The following gets those.
var pageNumber = myFoundSet.parentTextFrames[0].parent.name;
var foundContents = myFoundSet.contents;
However, I would like to include the number of the paragraph where the found text resides as well as the line number in that paragraph.
I am stumped on how to do this. Would be nice if there were a parentParagraph and a parentLine.
Can someone point me in a direction?
Thanks,
Tom
I have a script that finds certain text formatting. Rather than having the script select all the instances of this text I have an alert that lists the page number and the contents for each found instance. The following gets those.
var pageNumber = myFoundSet
var foundContents = myFoundSet
However, I would like to include the number of the paragraph where the found text resides as well as the line number in that paragraph.
I am stumped on how to do this. Would be nice if there were a parentParagraph and a parentLine.
Can someone point me in a direction?
Thanks,
Tom