Script to change font color of multiple layers in multiple files
Hello All!
I am working on a script to change the font color of all text layers of all files in a folder. I have modified script from a previous solution with mixed results. The script cycles through all the files but will not update the text layers as required.
Thanks for your help!
var textColor = new SolidColor();
textColor.rgb.hexValue = "111111"; //set color
//select folder where PSDs are held
var selectFolder = Folder.selectDialog( "Please select folder of PSDs");
var files = selectFolder.getFiles("*.psd");
//get an array of all PSDs in the folder
var fileList = selectFolder.getFiles("*.psd");
//iterate through file list
for (var i = 0; i < files.length; i++) {
var doc = app.open(files[i]);
for (var j= 0; j < doc.artLayers.length; j++) {
var lyr = doc.artLayers[j];
if (lyr.kind == LayerKind.TEXT) {
var lyr = doc.artLayers[j];
lyr.textItem.color = textColor;
}
}
doc.close(SaveOptions.SAVECHANGES)
}
