-
propertyIndex AND sourceText.split question
I wanted an expression on a text layer to mark #HASHTAGS and @SocialMediaNames blue. So I added the following code to the amount of color change in a bunch of Range selectors named 0, 1, 2…
When I evalucate the value of x, it is the correct number, but this expression wouldn’t work unless I typed a number.
I replaced
y=text.sourceText.split(” “)[x][0];with
y=text.sourceText.split(” “)[1][0];Also, if a gave it text that had two spaces, it through off the split from the value of the range selector.
x=thisProperty.propertyGroup(1).propertyIndex-1;
y=text.sourceText.split(" ")[x][0];
if ((y == "#") || (y == "@")) 100 else 0