4 Replies Latest reply on May 26, 2016 1:04 PM by ava74628296

    Find special character AUTO_PAGE_NUMBER

    ava74628296 Level 1

      I try to find the text frame in master, contains special characters corrent number page, when i run this code:

       

      var doc = app.activeDocument;
      var masters = doc.masterSpreads.everyItem().textFrames;
      for(i=0;i<masters.length;i++){
           $.writeln(masters[i].contents[0])
      }
      

      i get mark do not understand, like this: []

      And this code return error "Special Character is undefined"

      var doc = app.activeDocument;
      var masters = doc.masterSpreads.everyItem().textFrames;
      for(i=0;i<masters.length;i++){
          if(masters[i].contents[0] == specialCharacters.AUTO_PAGE_NUMBER){
              alert("OK")
          }
      }
      
      

      How i can do it?

      Thank in advance