file.close() undefined?
Posted: March 11th, 2007, 6:54 pm
I have a short script to launch another script(seems silly huh?). Everything works out OK up to the last line. I'm getting a "theFile.close function is undefined". It doesn't look like I'm doing anything wrong but I have no idea why it's giving me that error.
Code: Select all
var fileLoc = "";
//alert("inside after effects");
if (app.settings.haveSetting("ImagesLLC Photo Montage", "ScriptLocation")) {
fileLoc = new File(app.settings.getSetting("ImagesLLC Photo Montage", "ScriptLocation"));
}
if(fileLoc.exists){
theFile = fileLoc;
}else{
var theFile = fileGetDialog("Please find the Montage Script...", "");
app.settings.saveSetting("ImagesLLC Photo Montage", "ScriptLocation", theFile.toString())
}
//var scriptFile = new File(theFile);
theFile.open();
eval(theFile.read());
alert(theFile);
theFile.close();