-
Read a text layer source as a ASCII character value?
Hi there,
I have a basic but slowly growing understanding of expressions and have recently started to try and expand my knowledge of expressions in AE. Currently I’m experimenting with controlling text layers via expressions.
In my current project I would like to know is it possible to read a text layer source as a ASCII character value?
For example I know if I use the following expression in a text layer source: String.fromCharCode(65); it returns the character “A”.
However is it possible read “A” in the text layer source with an expression which will return the value “65”?
So far my experiments have come up with this expression: charCodeAt(thisComp.layer(“A”).text.sourceText) which only returns the result “NaN”.
Any thoughts or pointers would be very welcome…
Many thanks,
P.