Activity › Forums › Adobe After Effects Expressions › Source Text from Text File
-
Tom Granberg
May 13, 2010 at 9:09 pmYou are such a sport Dan!
At least now I do not get an error on the path, so I assume that is correct now.However I do get this now, I tried to add “;” but that seems to not work.
After effects warning: Expected: ;
Error occurred at line 3.Using this:
#include ‘/C/Users/Renderbrandt/Documents/text/code01.txt’;
-
Dan Ebberts
May 13, 2010 at 9:18 pm1. What’s the entire text of your expression?
2. What’s in your text file (exactly)?
Dan
-
Tom Granberg
May 13, 2010 at 9:24 pmFirst, thank you so much Dan for taking your time.
All I want is to show the text from the .txt file, not read the text as code, just plain text.
The entire expression is:
#include ‘/C/Users/Renderbrandt/Documents/text/code01.txt’;I was going to to try “hack” an expression to show random lines of the text file too. But one step at the time I suppose.
The text itself is actual a random code dump, I am using it as “generic” text for a computer screen on set.
Again thank you for teaching me this.
T
-
Dan Ebberts
May 13, 2010 at 9:33 pmThe file is going to get interpreted as JavaScript code, not text, so the file has to consist of valid javascript statements. The best you can do is probably put something like this in the text file:
txt1 = “first line of text”;
txt2 = “second line of text”;
txt3 = “third line of text”;
etc.Then in your expression you would have some code that would randomly display txt1, txt2, or txt3, etc.
Dan
-
Tom Granberg
May 13, 2010 at 9:37 pmAha, Now I do understand!!!
I wasnt aware that the file itself would be read as javascript.wow, I feel so……dumb
T
-
Peter Auboeck
January 27, 2011 at 2:18 amhe guys
this expression works great for windows., but i tried it with a mac an afx cs5 and it does not work at all !!! what could be wrong? i think there is a problem with the correct path. the file is on ” home” so teh path should be /text_test.txt but it isn`t
can anybody help me
thanx petee
Reply to this Discussion! Login or Sign Up