4.1. NppExec's Console behaviour

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.

To set the keyboard focus to NppExec's Console, use

NPP_SETFOCUS Con

Type "help npp_setfocus" in NppExec's Console for more details.

By default, when "Toggle NppExec Console" (Ctrl+~) switches from NppExec's Console to Notepad++'s editing window, the Console remains visible. If you want NppExec's Console to become hidden when switching to Notepad++'s editing window, do the following:

  1. in NppExec's Console, press Ctrl+F or F7 to show the search pane;
  2. in the search pane, check "Hide toggled Console".

See also: NppExec's Console [3.5]; Console output redirection [4.5].