Errrr, somewhat related, although much simpler (I think) thatn your original quesiton, but really really hoping that someone can help me.
I’m trying the expressions below and so far I haven’t been able to do so, the try/catch reads the error message, but that’s about it, I haven’t been able to read the contents of my variable.
The second expression (Harry Frank’s) it’s returning the following errors:
Expected ;. Error occurred at line 1.
After I put the requested semicolon I get this:
Illegal use of reserved word. error occurred at line 3.
All I got at line 3 is the word else.
Weirdest of all is that I have used this expression in the past and it worked perfectly, in fact I just tried it in a different computer and it worked, both machines are running AE CS6 and are macs, the only difference is the offending one is running on Mountain Lion, whereas the one that worked is running on Snow Leopard.
If anyone can help me solve this would be enormously appreciated, I have over a 100 captions to deliver tomorrow.
Thanks,
David.
try
{
myPath="~/Desktop/captions.txt";
$.eval(thisComp.name)[0];
}
catch
(err)
{"missing";
}
if ($.os.indexOf("Mac") != -1)
myPath = "/Expressions/";
else
myPath = "file://c:\Expressions";
myPath += "data.txt";
$.evalFile (myPath);
eval(thisComp.name);