Save & Exit function does not work in Willspo template

If you made a template for printing or HTML export, you can offer it to the others here. You can also ask here for help about these templates
Post Reply
Toniglandyl
Posts: 3
Joined: 2004-08-07 15:39:21
Location: Brighton, UK

Save & Exit function does not work in Willspo template

Post by Toniglandyl »

Hi,
I got a problem with the Save & Exit function in the Willspo MovieList template as it raises a script error. here is the script that deal with this stuff:

Code: Select all

function exit() {
	if (needToSave) {
		var fso = new ActiveXObject("Scripting.FileSystemObject");
		var orgFile = fso.GetFile(sourceFile);
		if (fso.FileExists("Backup/" + orgFile.Name)) {
			var tempFile = fso.GetFile("Backup/" + orgFile.Name);
			if (tempFile != null) {
				tempFile.Delete();
			}
		}
		orgFile.Copy("Backup/" + orgFile.Name);
		srcXML.save(sourceFile);
	}
	window.close();
}
Is there something wring with this code? Is there something I have to do so that it can manipulate the files?
Toniglandyl
Posts: 3
Joined: 2004-08-07 15:39:21
Location: Brighton, UK

Post by Toniglandyl »

Nobody to help me :badidea:
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Maybe because nobody can help you ?
I do not know if Willspo still comes here :/
(how come you come back on this old topic just now? You received an e-mail when I moved the topic to the newly-created section?)
Post Reply