ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Import text layers from txt file by word (or syllable)

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dave Rutt
Import text layers from txt file by word (or syllable)
on Jun 25, 2020 at 12:48:19 pm


I'm working on a workflow for making lyric videos. I've implemented Christopher Green's script for reading text from a txt file, which is a big improvement over what I was doing before. I can write the lyrics in a txt file, one word per line, and the script will convert each word to its own text layer in AE. (Actually I'm doing it by syllable, but same idea.) The problem is then I have to re-position everything into phrases, since it imports each word onto a new line.

Wondering if anyone can suggest a way for the script to read individual words instead of lines. I'm a reasonable programmer but I've never worked with an AE script so I'm finding this a little intimidating. I assume it would require changing this line:

text = myFile.readln();

I tried a couple alternatives but crashed AE. Any suggestions? (Also, any suggestions for a better scripting sandbox than just trying it and repeatedly crashing AE?)

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved