Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Source Text Character Limit

  • Source Text Character Limit

    Posted by Quest Rogers on August 15, 2016 at 4:15 pm

    Hi. I’m wondering if anyone knows if there’s a way to limit the number of characters that can be typed in a text layer? Basically some kind of clamp that would keep someone from typing too many characters in a text layer? I’d greatly appreciate any insight.

    Quest Rogers replied 9 years, 9 months ago 3 Members · 4 Replies
  • 4 Replies
  • Max Pinton

    August 16, 2016 at 1:23 am

    Sure. You could put the expression text.sourceText.substr(0,10) on Source Text, changing 10 to whatever you want the limit to be.

  • Quest Rogers

    August 16, 2016 at 12:36 pm

    Thanks Max! This is exactly what I needed. I appreciate it. Out of curiosity what’s the “substr” part of that do?

  • Kalleheikki Kannisto

    August 16, 2016 at 2:15 pm

    It returns a substring based on the beginning and end character indexes (0 to 10).

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Quest Rogers

    August 16, 2016 at 3:39 pm

    Thanks for the explanation!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy