Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects ExtendScript import file

  • ExtendScript import file

    Posted by Will Cavanagh on January 5, 2012 at 5:56 pm

    Hi, I’m pretty sure I’m doing more than one thing wrong here, but here goes… I’m trying to get AE to import a file from within a script.

    Here’s what I’ve got:

    myfile = new File;
    myfile = myfile.openDlg();
    fpath = myfile.absoluteURI;
    alert(fpath);
    alert(myfile.close());

    What happens when I run this is I get the file open dialog. I select a valid jpg image and click open. The open dialog closes, and I get an alert with the correct absolute path for the file. I click ok and get an alert saying “true” (the file object was successfully closed.) The problems comes in here: As soon as I open the file object, the I select file is deleted. The path that is returned for it is correct for where it WAS, but the file no longer exists at that location.

    Also, I don’t know how to tell AE to import a file object into the project.

    So what’s going on here? Is AE moving the file somewhere when I create the File object? Am I doing something wrong?

    getnmd.com
    nationalboston.com

    Dan Fredley replied 14 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy