0 Replies Latest reply on Dec 3, 2014 8:14 PM by staubbers

    we need a script that will select clipping path for multiple images in indesign

    staubbers

      this is what we have, but it's not working:

       

       

      app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll; 

       

      app.doScript(resetAllClippingPathsToActiveDoc, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Reset all Clipping Paths of the Active Document"); 

       

      function resetAllClippingPathsToActiveDoc(){ 

       

       

          var d=app.activeDocument; 

          var allGraphicsInDoc = d.allGraphics; 

       

          for(var n=0;n<allGraphicsInDoc.length;n++){ 

              if(allGraphicsInDoc[n].hasOwnProperty("clippingPath")){allGraphicsInDoc[n].clippingPath.c lippingType = ClippingPathType.PHOTOSHOP_PATH};

                  allGraphicsInDoc[n].clippingPath.appliedPathName = "Path 1"; 

              }; 

       

       

      };