-
insert variable into string
I’m using a script to insert an expression into a layer’s position property. How do I add variables into the expression thats being set?
for example, lets say:
var theLayer = “Some Layer Name”;and the position property of the selected layer my script is adding an expression to is:
myLayer.property(“position”).expression = “thisComp.layer(\”theLayer\”).position;
How do I get “theyLayer” variable’s value to be inserted into the expression? I can’t figure it out. In python its as easy as %s, then defining your variables after the quotes of the string in order as they appear. But here, I’m not sure.