-
Button that inputs expression from UI Panel
I can’t think of any other way to word the subject.
I have scoured everywhere and cannot find what I am looking for as bizarre as it sounds. I have found threads where people want to create a script to add an expression, some who want an expression to add to multiple layers at once.
I have created a UI Panel with a button (Well a few buttons and dropdownlists), when I select my layer and click the button it will place the expression onto that property.
So for example.
myBtn: Panel{text:’Station Selector’, orientation:’row’, alignChildren:[‘left’, ‘fill’],\
Wiggle: Button{text:’Wiggle’},\I have my button, if I assign it to change text etc
myPanel.grp.myBtn.Wiggle.onClick = function(){
var myComp = app.project.activeItem;
myComp.layer(“[Station]”).property(“ADBE Text Properties”).property(“ADBE Text Document”).setValue(“Wiggle”);This works fine.
What I would like it to do is something on the lines of based off what I’ve seen and guessing at.
myPanel.grp.myBtn.Wiggle.onClick = function(){
var myComp = app.project.activeItem;
myComp.selectedLayers.property.expression = ‘[wiggle (2,10)]’;I’m using wiggle as a simpler expression, as I want to use more beefy expression, but essentially I want the button to add the expression to property I’ve selected. I want to set up something where I don’t have to keep copying and pasting the expression. So I want a button that will just put it in.
Any help would be greatly appreciated