2 Replies Latest reply on Jul 12, 2011 9:53 AM by RichardM0701

    Simple hide a layer script need help

    RichardM0701 Level 1



      This will be an easy one for someone. I’m new to scripting so please be patient. All I need to do is have a script that hide a layer named "L2_NonTranslatedParts". I have tried to piece together some code but I have failed. Can anyone help? I'm also not sure why we are defineing "watermark" as a var. It was in the code I cut up.


      var myDoc = app.documents.item(0);
      var L2_NonTranslatedParts = "Watermark";
      try{app.activeDocument.layers.item(L2_NonTranslatedParts).visible = false;}
      catch(_){alert("Can't find layer: " + L2_NonTranslatedParts);exit();};