This document is provided as a way for PC/GEOS users to get the most out of
Ensemble. It contains technical information on how to modify PC/GEOS system
files and use undocumented features. Therefore, most of these tips are for
advanced DOS users and are not supported by GeoWorks since they go beyond the
scope of normal use. [Note also that GeoWorks cannot promise to get you out of
any mess you may create using this information. Not to say we won't, but the
customer service reps have not been briefed on this information since it is,
as Frank says, undocumented -- GW Adam]
This is the second edition of Tips and Tricks and will again be posted on
America Online. I have updated some of the icon names, added more tips for
version 1.2, and included a new version of DOS_CMD.EXE which uses less memory. I also go into a little
more technical detail in some areas. The major sections are:
A. Two undocumented functions: dosAssociations and dosParameters (these
functions allow you to run DOS programs when you click on a certain file type
and also allow parameters to be passed to DOS programs.)
B. How to reassign GEOS icons to DOS files
C. A listing of files essential for PC/GEOS operation
D. How to use external protocols with GeoComm
E. New for Version 1.2
F. Other Tips
I welcome comments and suggestions. You can reach me by sending mail on
America Online.
My screen name is FrankLfr.
dosAssociations and dosParameters
Two undocumented functions exist that allow GeoManager to (1) run DOS programs
when you click upon a certain file (or file type - like *.TXT) and (2) specify
parameters for DOS .COM and .EXE files. What this means is that GeoManager can automatically run a DOS program and load the DOS file you clicked on in the same way you can double click on a GEOS document and have its creator automatically load it! To use these functions you must modify your GEOS.INI file, so if you don't feel comfortable with this, you shouldn't do it. Also remember that there is a backup of your GEOS.INI file in the System directory named INI.BAK - in case things go wrong. Note: This backup copy is overwritten with the current GEOS.INI file when you run preferences or setup.
With that said, under the heading of [fileManager] in the GEOS.INI file you will
notice the function filenameTokens {}. The two new functions are
dosAssociations {} and dosParameters {}, both have a similar format to
filenameTokens {}. The best way of explaining their format is to just show
how they work by an example:
[fileManager]
filenameTokens = {
*.EXE = "gDOS",0
*.COM = "gDOS",0
*.BAT = "gDOS",0
*.* = "FILE",0,"NPAD",0 (In version 1.2, this line allows you to
double click on a } DOS file and have
Notepad come up automatically!)
dosAssociations = {
*.DOC = C:\UTILS\EDIT.COM
*.TXT = C:\UTILS\EDIT.COM
*.ZIP = C:\UTILS\PKUNZIP.EXE
}
dosParameters = {
FORMAT.COM = ?
PCPLUS.EXE = /f
DOS_CMD.EXE = ?
}
First let me explain the dosAssociations {} function. In the example above, I
have told GeoManager to invoke the file C:\UTILS\EDIT.COM each time a file with
the extension .TXT or .DOC is double clicked. You must specify the pathname
(unless the file is in the DOS PATH) and filename with its extension (i.e. C:\U
TILS\EDIT would not have worked). As seen in the example, wildcards are accepted
for the files (but not for the programs to be run, of course). What actually
happens is that GeoManager simply places the filename you clicked on after the
program on the command line. So, if you double clicked README.TXT, GeoManager
would drop to DOS and run 'C:\UTILS\EDIT.COM README.TXT.' Therefore, you must
be sure that your program allows files to be loaded by placing their name on
the command line (almost all programs do this). By the way, with version 1.2
you can specify that Notepad will open certain file types as seen above with
the line *.* = "FILE",0,"NPAD",0.
Note: If you use *.* for Notepad make sure you read the section "New for
Version 1.2" on how to modify your GEOS.INI so you don't lose your
dosAssociations.
The dosParameters {} function allows you to specify parameters for .EXE and
.COM files. Unfortunately, you cannot specify parameters for .BAT (batch) files
<sigh>. The format is straightforward: the filename with extension
(wildcards are accepted - for example *.COM), an equal sign, and then the
parameter(s). If the parameter is a question mark (?), then GeoManager will
prompt you for the parameters each time you double click on that file. To
enter the parameters a dialog box similar to this will appear:
.
You can also combine the two functions.
For example, I can modify dosParameters {} to look like this:
dosParameters = {
EDIT.COM = ?
PCPLUS.EXE = /f
DOS_CMD.EXE = ?
}
Here I have added the line EDIT.COM = ?. Now, every time I click on a *.TXT
or *.DOC file, GeoManager will know to load 'C\UTILS\EDIT.COM' from the dosAssoc
iations {} function,but it will also ask for parameters since I specified
EDIT.COM = ? in dosParameters {}. Note that the parameters are (for some
strange reason) added BEFORE the selected filename on the actual DOS command
line. So, if I double click on the file README.TXT and enter the parameter
"/v" when GEOS prompts me, the resulting DOS command line (what DOS would see),
looks like this:
C:\UTILS\EDIT.COM /v README.TXT - notice the order.
Finally, the dosParameters {} function can be used to create a DOS command line
feature as requested by several people. I did this by creating a simple
program called DOS_CMD.EXE whose only function is to pass its parameters to
DOS as commands. Thus, by having DOS_CMD.EXE in your World directory and
"DOS_CMD.EXE = ?" in the dosParameters {} function (as shown in the example),
you have a quick and easy way to enter DOS commands.
One more thing, since I have included BAT2EXEC, you can now simulate a a batch
file. For example, suppose I wanted to use the DOS DISKCOPY command because
this reduces the swapping of disks as opposed to copying a disk using GEOS
(the more RAM that is available the less swapping is required). I would
simply write a batch file named DISKCOPY.BAT, for example, that contains this
line:
C:\DOS\DISKCOPY %1 %2 %3 %4
Then I would compile the batch file to a .COM file using BAT2EXEC and write
the following under the heading of [fileManager] in GEOS.INI:
dosParameters = {
DISKCOPY.COM = ?
}
By placing the compiled DISKCOPY.COM file into the World directory, you have
quick access to this function. Now every time you double click on DISKCOPY.COM,
it will ask you for the parameters and then copy the disk. The same can be
done with the DOS FORMAT command, etc.
A word of caution:
I have had problems with BAT2EXEC in that it created phantom files in my World
directory. That is why I created DOS_CMD.EXE. It is safer and also allows
unlimited parameters (instead of creating and compiling a batch file which
simply contains %1 %2 %3, etc.).
There is another undocumented function called which allows you turn off the
blinking cursor. Under the section name [input] in the GEOS.INI file you can
write:
[input]
blinking cursor = false
which then turns off the blinking cursor. A value of 'true' would turn
it back on.
Assigning GEOS Icons to DOS Files
Here is a way to give your DOS files any icon seen in GEOS (to temporarily,
I hope, relieve the lack of an icon editor). Under the heading of [fileManager]
in the GEOS.INI file add the name of your file (wildcards ok) and then specify
the icon (ie token), which is a four letter code and is case sensitive.
The code is in quotes and is followed by a comma and a zero. For example,
if I wanted to give my PROCOMM.BAT file the GeoComm icon, my GEOS.INI file
would be modified to look like this:
[fileManager]
filenameTokens = {
PROCOMM.BAT = "TERM",0
*.EXE = "gDOS",0
*.COM = "gDOS",0
*.BAT = "gDOS",0
*.* = "FILE",0,"NPAD",0
}
Notice that I have placed the filename before the wildcards - this is important!
Also note that the four letter code for GeoManager is TERM. The four letter
codes for the rest of the icons are listed below along with the actual icons on
the next page. Remember they are case sensitive and must be in quotes followed
by a comma and a zero as seen above.
gDOS - generic DOS program icon WP00 - GeoWrite icon
FILE - generic DOS file icon NFCT - Nimbus font converter icon