Calling all scripting geniuses!!

I know this has been discussed before but and I’m not sure if it can be done, but oh my goodness I would be so grateful is someone could please rewrite the script to import illustrator files with layers into Animate 3.

My Animate Pro 2 workflow was so much easier thanks to that amazing script and I’m missing it soooo bad.

This is the AP2 compatible script:

function importIllustratorlayers()
{
var filename = FileDialog.getOpenFileName( “.ai;.pdf” );
if (filename) {
System.println(“importing " + filename);
var arguments = new Array;
var pdfImport = Application.specialFolders.bin + “/Pdfimport”;
arguments.push(pdfImport);
arguments.push(”-PDF_SUPPORT_CMYK");
arguments.push("-PDF_SEPARATE_LAYERS");

var folderPos = filename.findRev("/");
if (folderPos != -1)
{
var folder = filename.left(folderPos);
System.println(“folder = " + folder);
if (!folder.isEmpty())
{
arguments.push(”-outdir");
arguments.push(folder);
}
}

    arguments.push(filename);

    var ret = Process.execute(arguments, "");
    System.println("returned " + ret);

}
}

Whoops