Copy link to clipboard
Copied
Hi!
This script working perfectly in AE CS6:
var newContent = '<Project author="Donald">';
newContent += '\n<Start>' + "starttime" + '</Start>';
newContent += '\n</Project>';
try {
var data = new XML ( newContent );
var string = data.toXMLString();
filePath = "E:/test.xml";
var file = new File (filePath);
file.open("w");
file.write(string);
file.close();
alert("DONE for " + String (file));
}
catch (error) { alert("Error!"); }
But stop working in After Effects CC on step: file.write(string);
Can you show me the way how to make it work please?
Thank you in advance!
Oh, sorry, my friends, this is my fault, I've forgot to tick "Edit -> Parameters -> General -> Allow Scripts to Write Files and Access Network" ON after installation.
Cheers!
Copy link to clipboard
Copied
Worked fine for me on AE CC. It followed through to the alert and also created the XML.


Copy link to clipboard
Copied
Oh, sorry, my friends, this is my fault, I've forgot to tick "Edit -> Parameters -> General -> Allow Scripts to Write Files and Access Network" ON after installation.
Cheers!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now