Created
May 11, 2015 10:52
-
-
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
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
/* 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