Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How can I avoid using ‘eval()’ in my script?

  • How can I avoid using ‘eval()’ in my script?

    Posted by Kevin C. burke on April 15, 2015 at 12:34 am

    Hello,
    I’m trying to get After Effects to see a property path string (i.e. (‘Contents’)(‘Group 1’)(‘Contents’)(‘Rectangle 1’)(‘Contents’)(‘Rectangle Path 1’)(‘Position’)) as a property.

    I can do this with eval(), but I have been told that this is bad practice and could be potentially used maliciously.

    In my research for avoiding eval(), I’ve seen people suggesting passing strings to ‘window’ which allows the browser to recognize a function, variable, or whatever. Does something similar exist for After Effects and ExtendScript? If not, how can I get After Effects to see a string as a property path?

    Thanks! 🙂

    Kevin C. burke replied 11 years, 3 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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