Skip to main content
Faleva
New Participant
September 24, 2016
Answered

Changing text color in multiple .psd's with actions

  • September 24, 2016
  • 1 reply
  • 4073 views

Is there a way to change color of text layers in multiple .psd files (with diffrent text in each one) with actions?

All the files I need to do that with are structured the same way - background and above a text layer.

This topic has been closed for replies.
Correct answer SuperMerlin

I messed around a bit with it and have a basic understanding of JavaScript, I'm also quite patient. Just point me in the right direction

Where should I start?


Here are the basics...

#target photoshop;

main();

function main(){

//select folder where PSDs are held

var selectFolder = Folder.selectDialog( "Please select folder of PSDs");

//if no folder selected quit.

if(selectFolder == null) return;

//get an array of all PSDs in the folder

var fileList = selectFolder.getFiles("*.psd");

//iterate through file list

for(var a in fileList){

var textColour = new SolidColor();

textColour.rgb.hexValue = "00ff00"; //set colour to green

open(fileList);

activeDocument.activeLayer = activeDocument.artLayers[0];  //Select top layer

if(activeDocument.activeLayer.kind == LayerKind.TEXT){ //check if it is a text layer

activeDocument.activeLayer.textItem.color = textColour; //set text to colour

activeDocument.save(); //Save changes

activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document

}else{//not a text layer so close document

activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document

}

}//end of filelist

};

JJMack
Community Expert
September 24, 2016

You should ask about actions in the Photoshop General Discussion  forun this is a scripting forum. What you want to do would be better done using Photoshop Scripting IMO

JJMack
Faleva
FalevaAuthor
New Participant
September 24, 2016

If it would, then I better leave it here. So how could I change color of text layers in multiple .psd files (with diffrent text in each one) using Photoshop Scripting?

JJMack
Community Expert
September 24, 2016

You would program a Photoshop script.  If you do not have a programming  background and know a supported scripting language like JavsScript.  You would have a lot to learn.  Scripting is not as easy as recording an action.

JJMack