Automatic color change for specific words
Hello
I have a .jsx project with an automatic text change from a .csv but the texte is supposed to have words with different colors.
I succeded to change the text color automaticly but I want to change some specific words.
For example if the text layer contains : "where is my umbrella" I want "where is my" in white and "umbrella" in red.
Do you think we can do this color changement for some words automaticly ? If we could do it directly in After Effects, it should be possible by scripting, isn't it ?
I thought about two ways of doing it but I'm stuck.
- On the csv file, I put the word I want in red in bold. Then in my after effects script I say something like "if you see bold texte, then it's red". But I couldn't modify a piece of the text layer, only the entire layer.
- On the csv file I write on another column "Umbrella" and I say on my script "If in the text into this column contains the same words than the layer text (which had been changed before), then put this words in red ". But I had the same problem, how to select a specific word into a after effects text layer into my script ? The documentation don't say a word about this.
Do you think it is even possible ? Am I on the good path ? If you have another solution, I'm listening!
Thank you very much.
