Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Adding carriage return to expression?

  • Dan Ebberts

    July 9, 2014 at 6:43 pm

    You can add a carriage return with backslash+r. I’m not sure it will print correctly here, but I’ll give it a try:

    \r

    Dan

  • Navarro Parker

    July 9, 2014 at 7:28 pm

    I’m getting a syntax error with this:

    random(10).toFixed(0) + \r + random(10).toFixed(0)

  • Dan Ebberts

    July 9, 2014 at 7:46 pm

    Sorry, you have to put quotes around the backslash+r.

  • Navarro Parker

    July 9, 2014 at 7:49 pm

    Fantastic! Thank you!

    What other “\” tricks are there?

  • Dan Ebberts

    July 9, 2014 at 8:09 pm

    I think backslash+r is the only one I use in expressions, but there are others that can be handy when formatting text for output with scripts:

    https://www.w3schools.com/js/js_strings.asp

    Dan

  • Navarro Parker

    July 14, 2014 at 11:39 pm

    In case that link ever goes down:

    \’ single quote
    \” double quote
    \\ backslash
    \n new line
    \r carriage return
    \t tab
    \b backspace
    \f form feed

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