I have used the expression (below - which I think I got from this site, from one of the expression geniuses) to get the number of lines in a chunk of text by counting the number of "newline" characters ( \r on Mac OS X). But if I have a chunk of paragraph text, with wrapped lines, this will not work. I've tried using \n instead, which I've read is the "newer" carriage return character for Mac OS X but this always just returns "1" regardless of the text.
I'm trying to align a shape layer's y-position with each new line - similar to bullet points:
This is the first bullet of text.
This is the second. The bullets always stay with the first line regardless of how much the chunk of text has wrapped, even if it goes over several lines.
i've never found a way, maybe some one can give a definitive answer... so i'll stop trying to do this ;)
i know ae knows how many lines are in a text paragraph layer, because if you do add text animator to a paragraph text layer that has wrapping lines, twirl down the advanced tab, set 'based on' to lines and 'units' to index, low-and-behold the end point changes to the number of lines in the text layer.
**before you get to excited, thinking that you can just link you expression to the end point value of that text layer (as i did once), that end point value doesn't update with a source text update.. so if the first time you try this the end point value is '3', it will remain 3 despite how many times lines are in there the next time you type (or copy/paste).