Copy link to clipboard
Copied
So I have a code trying to add an expression to these properties, but the error comes back saying they are hidden?
Any help is appreciated, here's my code currently:
var animator = app.project.activeItem.selectedLayers[0].Text.Animators.addProperty("ADBE Text Animator");
var selector = animator.property("ADBE Text Selectors").addProperty("ADBE Text Selector");
selector.advanced.units.setValue(2);
var startExpression=("0");
var endExpression=("10");
selector.start.expression=startExpression
selector.end.expression=endExpression;
When you set the units to Index, it changes the names of the Start and End parameters. This should work:
var animator = app.project.activeItem.selectedLayers[0].Text.Animators.addProperty("ADBE Text Animator");
var selector = animator.property("ADBE Text Selectors").addProperty("ADBE Text Selector");
selector.advanced.units.setValue(2);
var startExpression=("0");
var endExpression=("10");
selector.property("ADBE Text Index Start").expression = startExpression;
selector.property("ADBE Text Ind
...Copy link to clipboard
Copied
When you set the units to Index, it changes the names of the Start and End parameters. This should work:
var animator = app.project.activeItem.selectedLayers[0].Text.Animators.addProperty("ADBE Text Animator");
var selector = animator.property("ADBE Text Selectors").addProperty("ADBE Text Selector");
selector.advanced.units.setValue(2);
var startExpression=("0");
var endExpression=("10");
selector.property("ADBE Text Index Start").expression = startExpression;
selector.property("ADBE Text Index End").expression = endExpression;
Dan
Copy link to clipboard
Copied
Worked perfect. Thanks mate.
Copy link to clipboard
Copied
can i know where we shoud type this exprition to work !?
Copy link to clipboard
Copied
It's a script, not an expression. You would save it (from a plain text editor) as a .jsx file then File > Scripts > Run Script File and navigate to the file.