Pipe opening and monitoring "Watch" example

Very simple pipe example.
This shows how to open a pipe file and monitor "Watch" it for incoming text.
(Without comments it's just 20 lines of code)
Written by Bruce Steers, Fully commented to explain the workings.
Once the pipe is opened the app continues to run and will react to any text sent to the pipe.
See My program GForm, An interactive shell GUI builder (advanced)
to see how 2 pipes can be used for 2 way communication between a
shell script and a gambas application.

More info in the source code.
for more wiki info on pipes see the OPEN PIPE page.

Author Bruce Steers
License GPL v2 or greater
URL http://bws.org.uk/Simple_pipe_example.zip

screenshot