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.
Copy link to clipboard
Copied
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