Skip to content

Instantly share code, notes, and snippets.

@grefel
Last active January 25, 2021 19:45
Show Gist options
  • Save grefel/6eee8ffec74a1903ef73a6b4783d359f to your computer and use it in GitHub Desktop.
Save grefel/6eee8ffec74a1903ef73a6b4783d359f to your computer and use it in GitHub Desktop.
Rename Swatch if possible
var dok = app.activeDocument;
for (var i = 0; i < dok.swatches.length; i++) {
try {
dok.swatches[i].name = "prefix" + dok.swatches[i].name;
}
catch(e) {
// could not rename
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment