Tool Standard I/O

(available in EditPad Pro only)

When adding a tool to EditPad Pro’s Tools menu, there are three pages of settings that you can make for each tool. If you are adding a console or text mode application to EditPad Pro’s Tools menu, then you can instruct EditPad Pro to communicate with the application via the options on the “Standard I/O” page.

By default, console applications read input from the keyboard and write output to the screen. On the DOS and Windows command line, you can use the less than and greater than symbols to redirect standard input and output. The command line “sometool <input.txt >output.txt” will cause sometool to read from input.txt and write to output.txt.

You cannot use these symbols on the command line when configuring EditPad Pro to run a console application. However, you do have a variety of options for redirecting standard I/O on the “Standard I/O” page.

What to Send to Standard Input

If a tool expects data via standard input (i.e. it expects a DOS/Windows command line like “sometool <input.txt”), EditPad Pro is capable of sending either the current file entirely, or only the selected part of the current file. The current file is whichever file you’re editing at the moment you run the tool by selecting it in the Tools menu.

If the tool is a text-based console application that accepts input from the keyboard, anything EditPad sends to the tool’s standard input will be processed by the tool as if you typed it on the keyboard. This does not work with graphical applications, since those do not use standard input to retrieve keyboard input.

Before running the tool, EditPad Pro makes an internal copy of the text it needs to send to standard input. If the tool takes a long time to run, editing or closing the file EditPad is sending to the tool will not affect the tool’s execution.

How to Capture Standard Output

If a text-based console application writes its output to the screen, or if an application outputs data to a file with a command line like “sometool >output.txt”, EditPad Pro can capture that output in various ways:

If you choose one of the three options to capture the output into a tab, you can make three additional settings for that tab:

If you close the tab EditPad Pro is using to capture standard output while the tool is still running, the tool’s output will be lost. However, the tool will keep running until normal completion. EditPad Pro will keep clearing the tool’s standard output without saving it anywhere.

How to Capture Standard Error

Standard error works just like standard output. While standard output is intended for console applications to produce their output, standard error is intended for their error messages. Not all console applications respect this distinction. Some may send error messages to standard output. When the application is run from a command prompt with output appearing on the screen, standard output and error are automatically combined onto the single screen. This makes some programmers forget to make their console applications distinguish between standard output and error.

Therefore, EditPad Pro offers the “combine with output” option. EditPad Pro will then mingle standard error with standard output, just like a console screen would. The combined output will end up in whichever location (tab or message panel) you selected for standard output.

All the other choices for standard error are identical to those for standard output. If you select one of the three tab options for both standard output and standard error, you will get two new tabs: one for standard output, and one for standard error.

Since EditPad Pro has only one message panel, the only way to capture both standard output and standard error into the message panel is by selecting the “message panel” option for standard output, and the “combine with output” option for standard error.