Multi-Spawn 1 (For Windows 3.1) -- Documententation

***********************************************************************
MSpawn1.zip
MSpawn1.txt -- Multi-Spawn 1 Documentation (This File)
MSpawn1.exe

All The Above:
Copyright (c) 1998 by Charles E. Bortle, Jr.
***********************************************************************

=======================================================================
PERMISSION:

As noted above MSpawn1.zip and all the files it contains are copyrighted
material.  Permission is hereby given to copy this file (MSpawn1.zip)
and to distribute it, intact, to others at no charge (except you may
charge a reasonable fee for the media).  You may not distribute
MSpawn1.zip nor any of it's constituent files in connection with any
form of product sale or promotion.  Note that you may not distribute
MSpawn1.zip or it's constituent files in modified form; only the original
MSpawn1.zip file may be freely distributed.  Electronic distribution
using ftp sites, World Wide Web sites, email, USENET, computer bulletin
board systems (bbs) is permitted as long as such distribution does not
violate rules of use of those particular systems/sites/hosts.

This program is made available as FREEWARE.  "Freely you have recieved,
freely give."
=======================================================================

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Disclaimer:

Although the program appears to function properly the user agrees to
use this program at his/her own risk.  The author shall not be held
responsible for consequences of use on any user's computer.  The program
is provided with no other support than this documentation file.
cbrtjr@ix.netcom.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------------------------------------------------
Short explanation for the existence of this program:

Someone in a USENET newsgroup asked how to launch more than one program
from an icon.  As far as I know there is no way. (You cannot, it appears,
launch a Windows program from a batch file within Windows and if you
launch Dos programs with a batch file the first program launched must
complete before the second one will be launched, etc.)  I took it upon
myself to try to solve this problem: The result is MSpawn1 (Multi-Spawn 1).

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
How to use MSpawn1 (overview):

First you must unzip MSpawn1.zip into some directory.

Now, using NOTEPAD or other plain text (ASCII) text editor, you must
create a INI file for the programs you wish to launch, using the file
TESTSPON.INI as a template (the details of the various entries will
be explained below in the INI FILE section of this document, so please
don't panic!).

Now, create a Program Item for MSpawn1.exe in any Program Group window
you wish to execute multiple programs from.  You do this by first selecting
the group you wish to place the icon in so that its group window is in the
non-minimized state.  Then you select File from the Program Manager menu
and select New.  If it is not already selected, select Program Item then
click Ok.  You will now see the Program Item Properties window.

Now, enter into the Description field whatever text you want displayed as
the caption for the item icon you are creating.

Now, in the Command Line field, enter the full path to MSpawn1.exe and
include the command line entry, which is the full path to the INI file
you wish to have MSpawn1 execute.

Example:
If you unzipped MSpawn1.zip into a directory on C: called MSpawn1 and
if the INI file mypgms.ini which you want executed is in a directory on
D: called launcher then the command line to execute the programs you
specified in mypgms.ini would be:

c:\mspawn1\mspawn1.exe d:\launcher\mypgms.ini


If you wanted to test mspawn1 with the testspon.ini file provided in
MSpawn1.zip then the command line, given the above example, would be:

c:\mspawn1\mspawn1.exe c:\mspawn1\testspon.ini

(TESTPON.INI, as it is provided, will launch the CLOCK and CHARACTER MAP
accessory programs which came with Windows 3.1)

For each group of programs you wish to launch you must create a new
Program Item (which shows up as an icon in a group window) exactly as
described above, supplying the path to a new INI file you will create for
that set of programs.  See below for detailed information about the INI
files you must create.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Detailed explanation of INI files used by MSpawn1:

The INI files are the heart of MSpawn1's power.  The entries you provide
in your INI files are how MSpawn1 is able to launch the programs you wish
to launch.

This first line in any INI file you create for MSpawn1 must be:

[MSpawn1]

(You may include comments as text lines above this line in the file)

This line is a flag which tells MSpawn1 that the lines that follow in
the INI file will be information for it to pay attention to.

All lines following the [MSpawn1] line will be commands to MSpawn1.

You may execute from 1 to 255 programs from a single INI file!

There are two types of lines you must enter to tell MSpawn1 what programs
to run.



The first type of line has the form:

Task:<sequence number>=<path to program> [optional command line to that program]

i.e.:

Task:1=NOTEPAD.EXE SPNGLOP.TXT

The above line indicates that the first program to launch is NOTEPAD and
that notepad should open the file SPNGLOP.TXT, if it exists, or give you
the option of creating it, if it does not exist.  (Note: spnglop.txt
will be created in the directory where MSpawn1.exe is located since no
path to spnglop.txt was specified as part of the command line)

Note: You may tell MSpawn1 to execute from 1 to 255 programs from one INI
file.  If you want to execute 3 programs, you will create 3 Task: lines
with sequence numbers 1, 2, and 3; that is the sequence numbers must start
with 1 and be a consecutive sequence.  The Task:1, Task:2, and Task:3 lines
may be in any physical sequence in the text but the order of execution is
Task:1 then Task:2 and then Task:3.



The second type of line has the form:

Window_Style_Task:<sequence number>=Options

i.e.:

Window_Style_Task:1=Min

The above line tells MSpawn1 to cause the program specified in Task:1 to
be launched with it's main window minimized and also that this window will
not be given the focus.

Note: For any one Task: entry the corresponding Window_Style_Task: entry is
optional; that is, if it is present it will specify the window style applied
to that programs main window, if, however, it is not present, then the
window's style will be set to Normalized With Focus.

Description of the Options:

There are four options: Min, Max, Norm, Focus

(These are case-sensitive, that is, you must type them with initial cap and
lower case for the rest of the letters)

Min, Max, and Norm are mutually exclusive; that is, only one may appear in
any one Window_Style_Task: entry since they indicate that the window will
be Minimized, Maximized, or Normalized.

Focus, if present, indicates that that window should be given the focus.
If Focus is not present in the Window_Style_Task: entry then the window
will not be given the focus.  (this option may or may not have any
significant effect depending on which programs you are trying to launch)

Note: These options may be placed in any order, that is, Min Focus or
Focus Min.  There must be at least one space between them.  Note also that
if you specify Max then Focus is automatically given since, by definition,
a window which is maximized takes up the whole screen, and therefore is the
only logical place to put the focus.  (Focus means which window recieves
keyboard and mouse input, generally)

Note also, that for some programs, such as CLOCK.EXE the Options may, or
may not, appear to work, as these programs have their own default or
parameterized window styles.


########################################################################
Running Dos programs under windows from MSpawn1:

First, specify the Task: entry as above.  If, for example, you wanted to
launch qbasic then you would create a Task: entry such as:

Task:1=qbasic.exe

(this assumes that qbasic.exe is either in the same directory as
MSpawn1.exe or is in a directory listed in your PATH environment variable.
Since qbasic.exe is usually found in the DOS directory, and since
DOS is often listed in the PATH then the above should work, otherwise
you will need to specify a full path such as:

Task:1=c:\lang\basic\qbasic.exe

When windows launcheds a DOS program, it uses a PIF file to set the
DOS Window's parameters.  If there is no PIF file for the DOS program, then
Windows has a default PIF it will use, called _default.pif.  In some
cases, however, you may want to use different settings than this default.
In order to do this you must create a PIF for the program you wish to
launch.  To do this you must use the Windows PIF editor, usually found
in the MAIN program group.  (Consult your Windows manual which came with
your machine.) The PIF file should have the same name as the EXE file;
That is, if you want a PIF file for qbasic.exe create a PIF file with
the name qbasic.pif.  After you create your PIF file you will then create
a Task: entry such as:

Task:1=c:\lang\basic\qbasic.pif

This will run qbasic.exe (presuming you told the PIF Editor the name
qbasic.exe, including the complete path to it, in the Program Filename
field) using the PIF settings in your qbasic.pif file.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Final note:

After MSpawn1 has launched all requested programs, it quits (does not
stay resident), leaving all launched (spawned) programs running to their
own conclusion, and freeing the memory used by mspawn1.exe.

Charles E. Bortle, Jr.
cbrtjr@ix.netcom.com


 

