Here's an example script that shows how to get AE to write a text file:
Code:
{
// prompt to save file
var theFile = filePutDialog("Save the text file.", "untitled.txt", "TEXT txt");
// if user didn't cancel...
if (theFile != null) {
// open file for "w"riting,
theFile.open("w","TEXT","????");
// write a line in the text file
theFile.writeln("Woohoo! I've written to a text file.");
// if a comp is selected, write the name of all the layers
activeItem = app.project.activeItem;
if (activeItem != null && activeItem instanceof CompItem) {
for (x = 1; x <= activeItem.numLayers; ++x) {
theFile.writeln(activeItem.layer(x).name);
}
}
// close the text file
theFile.close();
// open text file in default app
theFile.execute();
}
}