Page 1 of 1

How do you create batch export script?

Posted: May 6th, 2011, 9:42 pm
by snowniveus
Hi :D !
I recently wrote a script below to export some Comps which I select in the project window.

Code: Select all

function mpgExport() {
    var sel = app.project.selection;
    if (sel.length == 0) {
        alert("Select Compositions in the Project Window.");
    }

    for (i = 0; i < sel.length; i++) {
        if (sel[i] instanceof CompItem) {
            app.executeCommand(app.findMenuCommandId("MPEG-4...")); 
        }
    }
}

mpgExport();
But I had some problem.
1. It doesn't work when I select more than 2 Comps in the project window.
2. I need to see the setting window and name the file.

I would like to select several Comps in the project window and batch export those to separate files same name as the Comp.

Can anyone help me?

Thanks :)