Hey, Kevin! Hope all is well back at The Q!
I tried merging something like that into the code I got from the original post (line 4) but it never seemed to work right. Adding a second Expression Selector targeting “#” just led to gibberish.
Overall view of what I’m trying to do: Have a slave text layer with text “$$$$####@@@” and multiple formatting (think $=day, #=time and @=time zone in different colors/sizes/weights), then pull its text from a master layer (or more if need be) that can be adjusted by a Premiere Live Text template. End result, editors can change show info in Premiere and the day/time formatting of the endpage will stay constant and kerning won’t vary wildly.
MT = thisComp.layer("master").text.sourceText;
ST = text.sourceText;
myChar="$";
if(textIndex <= ST.length && text.sourceText[textIndex-1] == myChar) STCode = ST.charCodeAt(textIndex-1) else STCode = 32;
if(textIndex <= MT.length && text.sourceText[textIndex-1] == myChar) MTCode = MT.charCodeAt(textIndex-1) else MTCode = 32;
CV = text.animator("days").property.characterValue;
((MTCode - STCode)/(CV - STCode))*100
—
It is easier to destroy than to create.
More fun, too.