FORUMS: list search recent posts

dropdownlist error in script UI

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Anton Schleitre
dropdownlist error in script UI
on Aug 22, 2016 at 6:00:01 pm

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, Anton

This 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!"); (); ();

PAButton.onClick = function caller (){
//(main script, which works fine)

Return to posts index

Dan Ebberts
Re: dropdownlist error in script UI
on Aug 22, 2016 at 6:51:49 pm

I can't get it to fail. I notice that maskList is defined outside the function, which will work as long as some other part of the script isn't messing it up. Other than that, I don't know.


Return to posts index

Anton Schleitre
Re: dropdownlist error in script UI
on Aug 22, 2016 at 8:05:27 pm

Thank you for your time investigating this, Dan. It's very much appreciated.

maskList is not touched other than what you saw. It's strange...

Thanks again, Dan!

Best Regards

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved