3 Replies Latest reply on Mar 14, 2011 8:28 AM by lewis_cooper

    CS4 Script Broken in CS5

    lewis_cooper Level 1

      Hi all,


      I'm hoping this is an easy fix! I have a startup script that worked perfectly in CS4 that now complains CS5.


      I get a javascript error (number 90884) 'No documents are open'. This is the script:


      //DESCRIPTION: One Layer Up
      for (s=0; s<app.selection.length; s++)
      if (app.selection[s].itemLayer.index > 0)
        app.selection[s].itemLayer = app.activeDocument.layers.previousItem(app.selection[s].itemLayer);


      I'd be very grateful for some help with this.