Set text layer color line by line
Hi, New to photoshop scripting and trying to figure out if there is a way to iterate the contents of a text layer line by line, with the goal of setting each line to one of four colors. trying to run this on CS4 BTW.
It is easy enough to set the whole text layer color via code like this:
var textColour = new SolidColor();
textColour.rgb.hexValue="ff0000";
activeDocument.activeLayer.textItem.color = textColour;
But I can not seem to find an answer here for applying different colors within a single layer. I'm thinking (hoping) that you can iterate line by line using something like a .length property of the layer.
Any help would be greatly appreciated and apologies if this has been dealt with already.
