-
dropdownlist error in script UI
Hi there,
I’m new to scripting and wrote a script that actually does everything I want. The only problem I got is that the dropdownlist of my UI only shows it’s contents about 90% of the time. 10% of the time the dropdownlist is just empty. I have tested it with CS4 and the newest CC2015 version. I am clueless since it works most of the time. Maybe someone sees something I don’t. Most of the time when the error occurs is when I run the script for the first time. If I run it directly afterwards it works just fine. Any help would be more than appreciated. Best Regards, AntonThis is the code:(after some checks for user mistakes, function "startScript" is being called)
var maskList = new Array;
maskList[0] = "Like in Project Folder";
maskList[1] = "Randomly";function startScript (effectName){
var myWin = new Window ("palette", "create Object", undefined);
myWin.orientation = "column";var groupOne = myWin.add("group", undefined, "GroupOne");
groupOne.orientation = "row";groupOne.add ("statictext", undefined, "Please select the order of footage");
var orderNumber = groupOne.add ("dropdownlist", undefined, maskList);
orderNumber.selection = 0;var groupTwo = myWin.add("group", undefined, "GroupTwo");
groupTwo.orientation = "row";var checkboxOne = groupTwo.add("checkbox", undefined, "adjusted Start point");
checkboxOne.value = true;var groupThree = myWin.add("group", undefined, "GroupThree");
groupThree.orientation = "row";groupThree.add ("statictext", undefined, "Apply\""+effectName+"\"");
var PAButton = groupThree.add ("button", undefined, "Go!");myWin.center ();
myWin.show ();PAButton.onClick = function caller (){
//(main script, which works fine)
}
}