By default, NppExec's Console is automatically shown each time you execute some NppExec's script. The reason is simple: usually script execution assumes some output which is needed or at least may be usefull for user.
However, you may want some of your scripts to be executed silently (i.e. without showing NppExec's Console) or even want to force NppExec's Console to be closed. And NppExec allows you to do this using its command NPP_CONSOLE.
You can use
NPP_CONSOLE ?
in the beginning of your script in order to keep current Console's state. It means that hidden (closed) Console remains hidden and shown (opened) Console remains shown.
Also you can use
NPP_CONSOLE 0
to hide the Console, and
NPP_CONSOLE 1
to show the Console during script execution.
Type "help npp_console" in NppExec's Console for more details.
By default, NppExec's Console is automatically cleared each time you execute some NppExec's script. However, you can use
NPE_CONSOLE a+
to enable the "append" mode which keeps the previous Console's text and does not clear it.
Type "help npe_console" in NppExec's Console for more details.