-
ExtendScript function question
Hey all just a quick question to try and get some help. I have a function running to duplicate a layer in extendscript. It dupes the layer and adds a number on the end sequentially which is perfect. The part that is stumping me is I then need it to also add that number sequentially to the expression that is on that layer. I know that it is reading the expression correctly because I get it on every dupe it just doesn’t add the number to the expression. Any help appreciated, having a rough time learning this.
exa below
—————————-
var comp = newComp2;
var layer = comp.layer(“LINE “);
var yPos = layer.property(“ADBE Transform Group”).property(“ADBE Position_1”);
var exp = yPos.expression = “test “;createLines(comp, layer, parseInt(titleEditText.text), yPos, parseInt(titleEditText.text));
newComp2.layer(“LINE “).remove();function createLines(comp, layer, lines, yPos, exp){
var dLayer;
for(var i = 1; i <= lines; i++){
dLayer = layer.duplicate();
dLayer.name = “LINE “+i.toString();}
}