Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Access string without quotes

  • Access string without quotes

    Posted by Steve Sierra on April 14, 2017 at 5:08 am

    Hi,

    I need to get a comp name and put it in an expression via scripting.
    The problem is that the comp name seems to be given with double quotes, and, as far as I know, expressions via scripting require simple quotes…
    I can work around the problem by renaming the comp, but I’d prefer leaving it as is, in case it is referenced in another expression.
    I tried changing the name for my script then re-changing it back at the end + applying autoFixExpressions, but it didn’t work.

    Thanks !;)

    Steve Sierra replied 9 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 14, 2017 at 6:47 am

    If you want to include double quotes in the expression, you can wrap the expression in single quotes in the script. For example:

    var myExpr = ‘comp(“Comp 1”).layer(“Layer 1”).transform.position’;

    Dan

  • Steve Sierra

    April 14, 2017 at 8:20 am

    Great !

    Thanks again Dan 😉

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