1 Reply Latest reply on Sep 11, 2012 4:49 PM by CarlosCanto

    select text item within a specific group

    hilukasz Level 1

      I think I might be doing this wrong, I am trying to get contents of a specific textFrame within first group on layer called "page numbers"


      It seems to work, but is a bit sketchy, the documentation indicates textFrame is all the text frames in a document, and that textFrameItem should be the specific one within collections of groups etc, maybe I am misunderstanding. this is what I am using:


      var existingPageNumbers = app.activeDocument.layers.getByName('page numbers').groupItems[0].textFrames[0].contents;


      is this correct approach...?

        • 1. Re: select text item within a specific group
          CarlosCanto Adobe Community Professional & MVP

          that's perfectly correct, it so correct that it is the only way to get it to work, there's no textFrameItem object.


          I'm not sure but I think that back in the day, there used to be a textFrameItem when the super class was TextArt or something like that. The documentation is incorrect, check the pageItem section, it correctly indicates "TextFrame" class, while the pageItems section calls it "TextFrameItem" class.