Console Application Runner Classes Examples
Applies to: ~>3.0
This section provides numerous examples to help understand the behaviour and use of the Console Application Runner Classes.
They show how to undertake various common tasks using the classes provided in this library.
Most examples require the use of a suitable command line application. Source code of the applications referred to in the examples is is provided in Appendix 2.
Examples 6, 7, 8, 9 & 12 require one or more units from the I/O Utility Classes project in order to compile.
- Example 1: ExecAndWait.
- Example 2: A better ExecAndWait.
- Example 3: Indicating progress.
- Example 4: Timing out.
- Example 5: Terminating an application.
- Example 6: Redirecting standard i/o using files.
- Example 7: Redirecting standard i/o using pipes.
- Example 8: Capturing console output in a GUI.
- Example 9: Subclassing TPJConsoleApp.
- Example 10: Using TPJConsoleApp from console applications.
- Example 11: Customising the appearance of the console.
- Example 12: Handling Unicode output from console applications.
- Example 13: Customising a console app's environment block. [~>3.1]
Demo programs relating to each of the examples are included with the Console Application Runner Classes download.