ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Checking for carriage returns in a text layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dennis Cheung
Checking for carriage returns in a text layer
on Mar 19, 2020 at 9:46:49 pm

Hello again

How do I count the number of carriage returns in a text layer? I thought it was the same as looking for a certain word or character, but I'm not getting the result I'm looking for.

Thank you for your time
D


Return to posts index

Andrei Popa
Re: Checking for carriage returns in a text layer
on Mar 20, 2020 at 9:10:09 am

How did you search for a certain word?

Try this:

thisLayer.text.split("\r").length-1

Andrei
My Envato portfolio.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]