Daniel Wahl - 2020-12-01

Hello,
I am attempting to write a script which opens many files, manipulates the filename, and then prints to PDF.
I have the script system working.

This is where I am at:

from Npp import *

notepad.closeAllButCurrent()
notepad.open('C:\ <path> *.*')
all_files = notepad.getFiles()</path>

for afile in all_files:
notepad.activateFile(afile[0])
notepad.menuCommand(MENUCOMMAND.FILE_PRINTNOW )
notepad.close()

When this is run the files are opened and the print dialog pops up but:
It requires that I click the SAVE button to advance.

How do I click the SAVE with Python?

I want this to be hands off after the script is activated, ie- no clicking about with the mouse.

Yes there is other work to do, but getting this to work is first thing.

I have tried following the PRINTNOW with this:
notepad.menuCommand(MENUCOMMAND.FILE_SAVE )

But obviously it does not do what I desire. In fact it is quiet and hangs.
I have searched for examples but no joy.

Thanks
Dan