Running Rax scripts in Notepad++

To run Rax scripts in Notepad++ we will be using the NppExec plugin. If you installed Notepad++ together with Rax, the NppExec plugin should be already installed. To verify this, go to the Plugins menu and check if NppExec is listed there (see Figure A.3, “The NppExec plugin in Notepad++”). If you don't have the plugin installed, you can download it from sourceforge After downloading, unzip it, and drop NppExec.dll into the plugins directory in your Notepad++ installation directory (typically C:\Program Files\Notepad++).

Figure A.3. The NppExec plugin in Notepad++

The NppExec plugin in Notepad++

Figure A.4. Running a Rax file in Notepad++

Running a Rax file in Notepad++

To run a Rax script, first open it in your Notepad++. Now press F6. If your NppExec was installed by the Rax Installer, you can run Rax by selecting RunRaxFile in the dropdown box on the bottom of the dialog that pops up (see Figure A.4, “Running a Rax file in Notepad++”). Otherwise, you will have to type in the command yourself:

    "C:\Program Files\RaxDB\Rax 1.3\rax.cmd" "$(FILE_NAME)"

We are assuming here that your Rax installation is located in the C:\Program Files\RaxDB\Rax 1.3 directory. If you installed Rax elsewhere, you will need to change this path. Also, make sure that the 'Follow $(CURRENT_DIRECTORY)' option is on in the Plugins -> NppExec menu. After pressing OK, your Rax script will be executed, and its output will be displayed in the ConsoleRax window on the bottom. From now on, you can run Rax scripts by pressing Ctrl+F6. For nicer output, you can change the console font to a monospaced font, for example 'Consolas'. You can do it by selecting Plugins -> NppExec -> Change Console Font....

Figure A.5. Notepad++ with the Rax console and Rax syntax highlighting

Notepad++ with the Rax console and Rax syntax highlighting