-
Creating expression via Extendscript
I am having an issue creating an expression via a script. I’m creating a multi-line expression that is being added to Source Text. I am using \r to add returns to my expression so it is easy to read the expression and manipulate it further in After Effects. My issue is that part of my expression has a line where I am combining variables and adding carriage returns so the text is on multiple lines. When the line gets created it is adding carriage returns to the expression and breaking the expression. How can I pass “\r” as part of the code for After Effects to read as the expression?
This is how I am adding the expression
app.project.item(2).layer(1).property("Source Text").expression = 'normCopy = line1 +"\r"+ line2 + "\r" + line3;\r'This is how it shows up in After Effects
normCopy = line1 +"
"+ line2 + "
" + line3;