Lasse,
There is no commands in extended scripting to print to a file. The thing is that the automated printing scripts simply sends the job to the printer queue. After that, it's up to the printer queue to handle the job. Since printing to a file is done on the printer queue's level, and not on the scripting level, automated scripts have no control on it, and thus cannot affect the behavior of displaying a box asking for a file name.
Regards,
Rapha