-
Automating Text Data from External File
I want to automate the display of external text in a movie at specific times.
The text file will contain 1 field with multiple values ie Black, Red, Blue, Green. There will be 50 values in the actual text file.
I am happy to format the text file into whichever format is best for a script to access.
The movie will show each value at 5 second intervals in the same text box (ie in the same location and style in the movie).
The intended result is to have a text box that shows the values Black, Red, Blue, Green in sequence like this:
0s-5s : Black
5s-10s : <>
10s-15s : Red
15s-20s : <>
20s-25s : Blue
25s-30s : <>
30s-35s : GreenI have lots of movies to render in this style, so I am hoping that it will be possible to use a script so that I don’t have to manually type in 50 new values for each movie.
I am guessing that I should read the external text file values into an array and then reference the array elements in the script?
Would someone be able to point me in the right direction please? I am using AE 2020. Thanks!
My current script (where I have to manually update each data value) is this:if (time>0 && time<5) "Black"
else if (time>5 && time < 10) ""
else if (time>10 && time < 15) "Red"
else if (time>15 && time < 20) ""
else if (time>20 && time < 25) "Blue"
else if (time>25 && time < 30) ""
else if (time>30 && time < 35) "Yellow"
else if (time>35 && time < 40) ""
else if (time>40 && time < 45) "Green"
else ""