1 Reply Latest reply on Nov 14, 2016 12:54 AM by try67

    this.getPageNthWord using space or carriage return between words

    Jo_2013 Level 1

      I have a script which loops for a total of 8 words.

       

      The fourth word can be separated by a space in some instances or a carriage return (Paragraph mark) in other instances.

       

      The script is not working, if anyone can help modify the highlighted part of the script for the OR OPERATOR that would be most appreciated.

       

      numWords = this.getPageNumWords(0);

       

      for (var j = 0; j < numWords-1; j++)

      {

      ckWords8 = this.getPageNthWord(0, j) + ' ' + this.getPageNthWord(0, j + 1) + ' ' + this.getPageNthWord(0, j + 2) + ' ' + this.getPageNthWord(0, j + 3) + '\n' || ' ' + this.getPageNthWord(0, j + 4) + ' ' + this.getPageNthWord(0, j + 5) + ' ' + this.getPageNthWord(0, j + 6)  + ' ' + this.getPageNthWord(0, j + 7);