ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression Selector Amount 100 for lines of text including : sign

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Niels B Nielsen
Expression Selector Amount 100 for lines of text including : sign
on Oct 17, 2017 at 11:35:13 pm

Im trying to "dynamic text" a credit list for Premiere. I want every line with a : sign at the end to be highlighted through an expression for the Expression Selector. Every line with : should have a value of 100, the rest 0. Is this possible?


Return to posts index

Dan Ebberts
Re: Expression Selector Amount 100 for lines of text including : sign
on Oct 18, 2017 at 12:50:44 am

If you have the Expression Selector Based On set to 'Lines', this should work:


txt = text.sourceText.split("\r");
str = txt[textIndex-1];
if (str[str.length-1] == ":") 100 else 0



Dan



Return to posts index

Niels B Nielsen
Re: Expression Selector Amount 100 for lines of text including : sign
on Oct 18, 2017 at 8:15:18 am

Works well. Thanks for your quick help Dan!


Return to posts index

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