Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Why $.evalFile(“./filename”) does not work inside a function?

  • Why $.evalFile(“./filename”) does not work inside a function?

    Posted by Andrei Popa on March 27, 2018 at 1:34 pm

    I have solved this problem by using new File($.fileName).parent + “/filename”. But still wondering why it does work in the main part of the script, but not inside the onClick() function of one of my GUI button. Shouldn’t the Dollar ($) object be global?

    Andrei
    My Envato portfolio.

    Scott Mcgee replied 8 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Scott Mcgee

    March 28, 2018 at 7:57 am

    I have this issue when writing eval functions in After Effects.

    wl = loc + city + “/weatherdata” + thisComp.layer(index+num).name.toLowerCase() +”.txt”;
    wl += “/”;
    $.evalFile(wl);

    This is how I use it in after effects. I don’t know if it’s the same in extendscript as I’ve never had the needed to try it.

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