I have to record some text strings from an HTML webpage into a text file to be processed by another program.
I've tried many javascript examples but so far I haven't even managed to get a file.
<script>
function wFile(filepath, output) {
var txtFile = new File([""], filepath);
txtFile.open("w"); //
txtFile.writeln(output);
txtFile.close();
}
wFile("C:/temp/test.txt","some text");
</script>
F12 results in: Uncaught TypeError: txtFile.open is not a function