2 Replies Latest reply on May 20, 2014 4:08 AM by jdegheest

    how to move frame with undefined script label to specific layer?

    jdegheest

      I am using currently using a script to move specificly named text frames and page items to their corresponding layers (It's for making a catalog with multiple languages)

       

      it looks like this:

       

      ---------------------------------------------------------------

       

      app.documents[0].textFrames.item("NL").itemLayer ="NL";

      app.documents[0].textFrames.item("FR").itemLayer ="FR";

      app.documents[0].textFrames.item("ES").itemLayer ="ES";

      app.documents[0].textFrames.item("DE").itemLayer ="DE";

      app.documents[0].textFrames.item("PL").itemLayer ="PL";

      app.documents[0].textFrames.item("BASE").itemLayer ="BASE";

       

      app.documents[0].pageItems.item("BASE").itemLayer = "BASE";


      ---------------------------------------------------------------

       

      So this works fine. All items have been labeled beforehand and put into a sort of template that we use over and over again (we're using EasyCatalog so if you don't know what I'm talking about, it does make a lot of sense to do it this way)

       

      What I feel is missing is a piece of code that can detect the items without any script labels, because there's always a lot of manual work to be done too, and new items - which have no script label - can get stranded on the wrong layers if you're not paying attention.

      So basicly, I would like that all frames without labels, get moved to the layer "BASE". It seems possible, but I can't find any good examples anywhere...