Activity › Forums › Adobe After Effects Expressions › Adding carriage return to expression?
-
Adding carriage return to expression?
Posted by Navarro Parker on July 9, 2014 at 6:21 pmI can put a space between two numbers by doing this:
random(10).toFixed(0) + " " + random(10).toFixed(0)But how do I insert a carriage return so I can stack my two numbers vertically?
Navarro Parker replied 12 years, 1 month ago 2 Members · 6 Replies -
6 Replies
-
Dan Ebberts
July 9, 2014 at 6:43 pmYou 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 pmI’m getting a syntax error with this:
random(10).toFixed(0) + \r + random(10).toFixed(0) -
Dan Ebberts
July 9, 2014 at 8:09 pmI 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 pmIn case that link ever goes down:
\’ single quote
\” double quote
\\ backslash
\n new line
\r carriage return
\t tab
\b backspace
\f form feed
Reply to this Discussion! Login or Sign Up