Skip to content

Instantly share code, notes, and snippets.

@groupetma
Created May 11, 2015 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save groupetma/330f4cb8a76b603a25fd to your computer and use it in GitHub Desktop.
Save groupetma/330f4cb8a76b603a25fd to your computer and use it in GitHub Desktop.
Toutes les couleurs utilisées qui ne sont pas dans la palette nuancier seront créées All used colours that are not in the Swatches panel will be created
/* Toutes les couleurs utilisées qui ne sont pas dans la palette nuancier seront créées
All used colours that are not in the Swatches panel will be created
par benCloutier.com (www.groupetma.com)
*/
nomDuScript = "Couleurs nommeees";
dateRev = "1.0 (2013.03.25)";
myID = "ben@bencloutier.com";
try{
var myDocument = app.documents.item(0);
var myPage = myDocument.pages.item(0);
}catch(e){
alert("Aucun document ouvert!\nUn document doit être ouvert. Le script va quitter.");
exit();
}
var myElements = myPage.allPageItems;
for(i=0;i<myElements.length;i++){
if(! myElements[i].fillColor.name){
var mySelection = this.app.selection;
app.menuActions.itemByID(16403).invoke();//Add Unnamed Colors
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment