-
Listbox .selectedItem, .selection, .??????
I have a listbox, I want to be able to take the value from a selected item, hit my apply button and it will put the value into my text layer. I’ve tried .getDisplayedItem, .selectedItem, .selection, .prettyMuchAnythingICanFindOnline.
The only one that has brough back anything is myList.selection, which brings back “NULL”, everything else either brings back Null is not an object, or it does nothing. Any suggestions?
//BTN: to apply selected listbox item
var myBtn = w.add (“button”, undefined, “Apply”);
var myComp = app.project.activeItem;
var Text1 = myList.selection;
myBtn.onClick = function(){
myComp.layer(“Amount”).property(“ADBE Text Properties”).property(“ADBE Text Document”).setValue(Text1);
}