-
Trying to break text into different lines
I have a few text layers which need to take their source text from the comp name, it just makes my job easier as I need to replicate the action several times.
One of the texts is too long and doesn’t fit in one line so I’m trying to break it automatically using the expression below.
The expression is not returning any errors but it’s not breaking the text either.My guess is that it’s missing the bottom part of the expression: “else” and then something
but I have no idea how to instruct the expression to not break the line.Can anyone help?
Thanks in advance.t=thisComp.name;if
(t.length % 6 ==0)
{
t +="\r";
}
;
t;