I want to populate simple drop down list in my script, with values that exist in csv file. How can I write that?
I have no idea as of now. I just starting to learn scripting for After Effects. Thanks!
I'm going to assume that you already know how to write the code for a user interface and jump straight to the specifics of what you asked.
You can import your csv file into your After Effects script and convert it to an array using something like this:
var csvFilepath = 'filepath/your_csv_file.csv';
var read_file = File(csvFilepath);
read_file.open('r', undefined, undefined);
var csv = read_file.read();
var csvArr = csv.split( ',' );
Then you should be able to use csvArr in the items property of your dropdown menu code. This could look something like this:
var csvDropDown = win.add("dropdownlist", undefined, undefined, {name: "csvDropDown", items: csvArr});
csvDropDown.selection = 0;