Find firstword of paragraph Lines
Hi All,
How to find the continue 3 same words in firstLine?
I tried the code 3 same words lastword of lines is working, but firstLine is not working.Please suggest friends
Code is here:
var myDoc = app.activeDocument;
var myLines_first = app.activeDocument.stories.everyItem().lines.everyItem().words.firstItem().getElements();
for (var i=0; i<myLines_first.length; i++)
{
if(myLines_first.contents==myLines_first[i+1].contents && myLines_first.contents==myLines_first[i+2].contents)
{
var myResult = app.select(myLines_first)
alert("stack word there")
break;
}
else
{
alert("No stackwords found");
exit();
}
}
Thanks,
Prabu G