Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

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

$
0
0

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"; 

        }; 

 

 

}; 


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>