-
Getting Number of Words in a Text Layer via Expression.
Hey Everyone!
Is there any expression that will return the number of words in a text layer? I’m trying to create a template for a sing-along type effect that will be easy for someone to just rename the text layer, and the effect will automatically update.
Right now my workaround is having a Slider Control that the user has to use to specify the number of words in the text layer, but I’d really prefer to eliminate that step if it’s possible.
Thanks for your help!
EDIT: Never mind! I figured it out thanks to a Dan Ebberts response to another question. The code I ended up with looks like this:
words = thisComp.layer("first line").name.split(" ");
words.length