var commandFile = new File();
commandFile.saveDlg("Save the file as command.nhf", "*.nhf");
this brings up a save dialog to save the file but as far as I can tell it is just a temporary file which is deleted as soon as the script is finished. I'm hoping I dont have to learn VB or C# to get this working.
You are almost there…
var f = File( '~/Desktop/Printer_Info.txt' ); f.open( 'w' ); f.write( 'Hello printer A4 please…' ); f.close();