4 Replies Latest reply on Jun 10, 2011 3:19 AM by Stephen Horne

    JS target items on activeSpread and on a certain layer

    Stephen Horne

      I'm trying to target only the items on the active spread, and on a certain layer. I can do this easily using applescript, but I'm completely new to javascript.

       

      So far I can get every item on the active spread thus:

       

      app.activeWindow.activeSpread.pageItems.everyItem()

       

      and I've tried this for getting this on a specific layer, but it doesn't work:

       

      app.activeDocument.spreads.item("Layer 1").pageItems.everyItem()

       

      However, what I really want is to combine the two, so I get every item on the active spread whose item layer is "Layer 1".

       

      Am I barking up the wrong tree here?