it is printing continous chain of three words ending with word null.
i tried in may ways but it is not helping. what i want my program to do is, if it finds the third word followed by first and second word then print it and end the loop.
var myplane, chWord, chWord2, chWord3, numWords;
for (var i = 0; i < this.numPages; i++)
{
numWords = this.getPageNumWords(i);
for (var j = 0; j < numWords; j++)
{
chWord = this.getPageNthWord(i,j);
chWord2 = this.getPageNthWord(i,j+1);
chWord3 = this.getPageNthWord(i,j+2);
if (chWord == "Applicability")
{
if (chWord2 == "Effectivity")
{
myplane = chWord3;
console.println(myplane);
break;
}
}
}
}
Otherwise, if the words you're looking for are not found, there will be an exception when you try to get words which are higher than the amount of words on that page.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com