            SPAWNER - Program launcher for STinG v1.40
            ------------------------------------------
		      (c)1998 Gary A. Priest
                      ----------------------
SPAWNER is a freeware program launcher for the Atari ST/STE/TT/Falcon
and compatibles, specifically for use with STinG's LOGIN.BAT 
functionality.

SPAWNER is a simple program that can be executed from STinG's 
LOGIN.BAT file (see STinG's documentation for how to do this).

Programs in STinG's LOGIN.BAT are executed sequentially where each one 
must terminate *before* it executes the next one. SPAWNER is 
different, in that it can execute programs in parallel without having 
to wait for each one to finish. This means you can simply have SPAWNER 
running from the LOGIN.BAT and then SPAWNER could automatically launch 
POPwatch, NEWSwatch etc. as soon as the dialer has connected.

This is a simple program without much testing and as such it may not
work under all operating systems etc. It should work under MagiC and
MultiTOS, but for normal single TOS it probably won't be much use as 
it simply uses Pexec to run each program.

It does understand the VA_START protocol, and if it finds that a 
program is already running it will send it a VA_START message rather 
than execute another instance of the program, unless prefixed with a & 
character (see below).

Some programs have problems finding their RSC files etc. when the 
current working directory is not the same as their own path ie. if 
started from a script like this. SPAWNER works around this by changing 
the current working directory *before* executing each program, then 
changing it back. This can only work if you specify the whole path to 
a program including drive. eg. D:\FRED\BLOB.PRG will work, but 
BLOB.PRG won't.


CONFIGURATION
-------------
SPAWNER expects to find a script file called SPAWNER.DAT in the same 
path as SPAWNER.PRG, unless SPAWNER is started with a command line, 
in which case that is assumed to be the name of the script file to be 
used in place of the default SPAWNER.DAT. This file should contain a 
list of all programs you wish to be executed. Comment lines can be added
by starting them with a #.

A side effect of STinG using Pexec to execute programs from LOGIN.BAT 
means that for SPAWNER to find it's .DAT file, both .PRG and .DAT 
*must* be stored in the same path as the STinG DIALER.APP.

If you actually wish a program to be executed and for SPAWNER to wait 
until it has finished before executing the next program (as STinG's 
LOGIN.BAT does), then simply prefix the line with a ! symbol eg. the 
following would run BLOB.PRG, wait until it terminates, and then run 
BLOB2.PRG and BLOB3.PRG in parallel, and then SPAWNER would terminate.

!D:\BLOB.PRG
F:\BLOB2.PRG
F:\BLOB3.PRG

Command lines can be sent to programs too. Thus

F:\POPWATCH.PRG /c /r /d /q

Would automatically run POPwatch, connect, retrieve all mail, 
disconnect, and quit once finished.

If the program you are launching does not understand the VA_START 
command, or you actually want more than one instance of the program 
running at the same time, then you can tell SPAWNER not to use 
VA_START when launching a particular program. All you need to do is
to prefix the line with a & symbol eg. the following would cause two 
copies of BLOB.PRG to run at the same time.

&D:\BLOB.PRG 
&D:\BLOB.PRG

FREEWARE
--------
SPAWNER is such a tiny program it is FREEWARE!

If you use and like it, or find any bugs then please drop me an email
and tell me. Without encouragement, SPAWNER may not develop. So, even
if it's just a one liner, please make the effort.


DISCLAIMER
----------
SPAWNER is used at your own risk. I will not be held responsible for 
any damage caused either directly or indirectly from it's use, or the 
loss of any electronic data.


POSSIBLE PROBLEMS/LIMITATIONS
-----------------------------
I have tested it under MagiC and MultiTOS (MiNT and AES4.1), and it 
works. I've no idea if it works under Geneva or other operating systems.
It probably won't be any use under single TOS.

Please don't yell at me if it doesn't work with your system. Let me 
know and I'll see if I can fix it.

The following shows the methods used to launch programs under various 
operating systems.

SingleTOS
---------
Pexec mode 0 is used to run programs.

MagiC
-----
Shel_write #1,(#0 for .TTP/.TOS else #1),#100,#program,#com is used.

All others inc. MultiTOS
------------------------
Shel_write #0,#0,#0,#program,#com is used.
 
 
NEW VERSIONS
------------
The latest version can be found at my website:

http://www.the-gap.demon.co.uk/
   
Gary Priest 18/11/98
gary@the-gap.demon.co.uk
