Highlighted

Source text from external file

Community Beginner ,
Apr 23, 2020

Copy link to clipboard

Copied

Hi everyone,

 

I need your help. I have an animation where I wish to apply text from an external file to particles. For that I need a text layer where every frame is another word.

Every experession I tried failed:

 

myPath = "/C/Temp/text_test.txt";
$.evalFile (myPath);
f = timeToFrames();
txt[Math.min(f,txt.length-1)]

 

Or:

 

myPath= "/C/test1.txt";

$.evalFile(myPath)

 

And what kind have to be the file I import? I mean every line should be somehwo marked?

 

Thanks.

 

Swenia

Topics

Expressions

Views

729

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Source text from external file

Community Beginner ,
Apr 23, 2020

Copy link to clipboard

Copied

Hi everyone,

 

I need your help. I have an animation where I wish to apply text from an external file to particles. For that I need a text layer where every frame is another word.

Every experession I tried failed:

 

myPath = "/C/Temp/text_test.txt";
$.evalFile (myPath);
f = timeToFrames();
txt[Math.min(f,txt.length-1)]

 

Or:

 

myPath= "/C/test1.txt";

$.evalFile(myPath)

 

And what kind have to be the file I import? I mean every line should be somehwo marked?

 

Thanks.

 

Swenia

Topics

Expressions

Views

730

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Guide ,
Apr 23, 2020

Copy link to clipboard

Copied

I did a quick google search and found this:

https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=15319&univpostid=15319&pview=...

 

However, $.eval() seems only work if the expression engine is set to ExtendScript.

 

I didn't find a way to make it work with JavaScript expression engine.

 

*Martin

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Guide ,
Apr 23, 2020

Copy link to clipboard

Copied

Just realized that's the code you are already using...

 

I think the nowadays approach is to use a JSON instead of a simple text and do the workflow for data driven animations.

 

*Martin

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Apr 23, 2020

Copy link to clipboard

Copied

Its OK, Ive tried I lot of vairants and no one works 😞

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Participant ,
Apr 23, 2020

Copy link to clipboard

Copied

Have you tryed to add '~' to the path?:

'~/C/...'

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Guide ,
Apr 23, 2020

Copy link to clipboard

Copied

I did while testing an older expression for that which used to work. If the expression engine is set to ExtendScript, the expression is working as intended, but if the engine is JavaScript, the same expressions fails. 

Unfortunatly the JS methods open() and read() aren't implemented - therefore I think Adobe cut off this path. 

 

JSON like in data driven animations seems to be the new way.

 

*Martin

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
sweniat LATEST
Community Beginner ,
Apr 24, 2020

Copy link to clipboard

Copied

Yes, dont work 😞

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...