4.3. Run-time parameters

NppExec supports several different ways to use run-time parameters which you can vary according to your needs.

The first line of each section below shows how the run-time parameter(s) can be set, and the second line shows how these parameters can be used.

  1. Passing parameters to NppExec's script (to use them inside the script):
    NPP_EXEC "my script" "param 1" "param 2"
    -> $(ARGV), $(ARGV[1]), $(ARGV[2]), ...
  2. Run-time input (sets NppExec's variable $(INPUT) and so on):
    INPUTBOX "Input some value:" : "default value"
    -> $(INPUT), $(INPUT[1]), $(INPUT[2]), ...
  3. User's variables (internal NppExec's variables):
    SET variable = value
    -> $(variable)
  4. Environment variables (can be modified also outside of NppExec)
    ENV_SET variable = value
    -> $(SYS.variable)

See also: User (internal) variables [3.8.2]; Environment (heritable) variables [3.8.3].