• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Read text from external file and send to AME automation

Explorer ,
Aug 29, 2020 Aug 29, 2020

Copy link to clipboard

Copied

Hi everybody 

 

I'm new to javascript/extendscript. I like to ask about automation and i don't even know if its possible to do. 

 

Now i have text layer named "City" contains city name, and comp name starting like Everything about + textlayer.source. Beginning of comp name is fixed and when i change text source, it will be added to the comp name. Thanks to fellas in forum i figured out this with simple script like this :

 

 

var myComp = app.project.activeItem;
var nameLayer = myComp.layer("City");
var theText = nameLayer.property("Source Text").value.text;

 myComp.name = "Everything about" + theText;

 

 So this is my scripting level, maybe a little bit more. I m changing text to for example "Berlin", run script and comp name become "Everything about Berlin" then send it to AME Render Queue manually each time. 

 

Problem is that i have .txt file with more than 350 cities line by line. Question is obvious, is there a way to read text from .txt or .csv file, a line at a time, evaluate script, send it to AME and repeat process for each line in .txt file? 

 

Thank you.

TOPICS
Dynamic link , Expressions , Import and export , Scripting

Views

121

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
community guidelines
Community Expert ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

LATEST

Totally possible, a few steps are involved:


- Reading and parsing a text file in ExtendScript (http://estk.aenhancers.com/file-system-access/file-object.html#read)

- Modifying your project(s) (looks like you got this figured out already)

- Queuing those comps in AME (http://docs.aenhancers.com/renderqueue/renderqueue/?highlight=ame#renderqueue-queueiname)

 

Note that queueing comps this way doesn't carry across all the settings. You'll have to adjust the format/output settings in AME once your comps are queued up. If you want full control, over the AME exports, check out these docs: http://ame.aenhancers.com/ . You can send commands from AE to AME through BridgeTalk, or with a multi-app CEP panel

Votes

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
community guidelines