Created
May 11, 2015 10:53
-
-
Save groupetma/b825eb111e5f5dda7a23 to your computer and use it in GitHub Desktop.
Ce script affiche les mode de couleurs des liens (sauf EPS) This script display Links color space (except EPS files)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Ce script affiche les mode de couleurs des liens (sauf EPS) | |
This script display Links color space (except EPS files) | |
par ben@bencloutier.com | |
Pour révision des versions, voir au bas de ce document | |
*/ | |
nomDuScript = "Affiche le modes couleur des liens" | |
dateRev = "1.0 (rev.19.11.2014)" | |
myId = "ben@bencloutier.com"; | |
myDocument = app.activeDocument; | |
myLinks = myDocument.links; | |
myCMYKs = []; | |
myRGBs = []; | |
myErrors = []; | |
rgbLinks(); | |
alert("Terminé:\n" + myCMYKs.length + " CMYK\n- " + myCMYKs.join("\n- ") + "\n\n" + myRGBs.length + " RGB\n- " + myRGBs.join("\n- ") + "\n\n" + myErrors.length+ " Erreurs\n- " + myErrors.join("\n- ") + "\n\n" + myId + "\n" + dateRev); | |
function rgbLinks(){ | |
for (i=0;i<myLinks.length;i++){ | |
myLink = myLinks[i]; | |
try{ | |
switch(myLink.parent.space){ | |
case "CMYK": | |
myCMYKs.push(myLink.name + " (" + myLink.parent.space + ")" ); | |
break; | |
case "CMJN": | |
myCMYKs.push(myLink.name + " (" + myLink.parent.space + ")" ); | |
break; | |
case "RGB": | |
myRGBs.push(myLink.name + " (" + myLink.parent.space + ")" ); | |
break; | |
case "RVB": | |
myRGBs.push(myLink.name + " (" + myLink.parent.space + ")" ); | |
break; | |
default: | |
} | |
}catch(e){ | |
myErrors.push(myLink.name + " (pas vérifiés)" ); | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment