-
Can’t write to file (after effects scripting)
I have this code:
var exportDurationFile = new File;
exportDurationFile = exportDurationFile.saveDlg ("Choose your duration export location", "Text File:*.txt");exportDurationFile.open("w");
$.writeln("opened for writing");exportDurationFile.encoding = "UTF-8";
$.writeln("Encoding set to UTF-8");exportDurationFile.write("test");
$.writeln("test written to it");exportDurationFile.close();
$.writeln("file closed");$.writeln("export succesfully");
But it doesn’t write anything to the file, this is the console output:
Select output file
opened for writing
Encoding set to UTF-8Does anyone know what I’m doing wrong?