home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
e
/
estat21.zip
/
EASIDOC.ZIP
/
ESCHAP13.DOC
< prev
next >
Wrap
Text File
|
1992-06-30
|
6KB
|
199 lines
Chapter 13: EASIGRAF IN BATCH MODE
Instead of running EASIGRAF interactively, it is possible
to set it to run automatically from a command file in a
similar way to EASISTAT, although the procedure is not
quite so straightforward. The main purpose is so that
graphs can automatically be modified and saved in
Microsoft Paint format from a DOS batch file, and if you
familiar with the use of batch files you may find this
feature helpful.
13:1. Using a command file
To use a command file you must run EASIGRAF as follows:
EASIGRAF graphfile commandfile
The command file can have any name as long as it does not
have the extension .MSP. It contains the keys that you
would press to use EASIGRAF interactively. Where EASIGRAF
is just asking for one key to be pressed at a time then a
number of letters can all be put on one line. Where
EASIGRAF is asking for a whole line of information then
this must be entered in the command file on a new line.
The underline symbol "_" (above the hyphen on the
keyboard) has the same effect as pushing the ENTER key
and the caret symbol "^" (above the 6 on the keyboard)
has the same effect as pushing the ESCAPE key.
Example command file:
mk1
a567
0,0.5,0.1
0,2,1
_
F1
fred.msp
_
The first line turns off the main menu, selects the "Key"
menu and toggles off the key. The end of the line has the
same effect as pushing ENTER and so the "Key" menu is
left and one returns to the main menu. Then the "Axes"
menu is selected, the X and Y scales are toggled on and
the option to rescale the axes is selected. The third and
fourth lines then provide the new X and Y scales. The
underscore provides an ENTER to leave the "Axes" menu and
return to the main menu. F1 selects the "Files" menu and
the option to save in MSP format and the next line gives
the filename to use. The final underscore acts as an
ENTER to leave the file menu. When there is nothing left
in the command file control returns to the user, or
alternatively the command file could finish with a Q (for
quit) in which case EASIGRAF would finish and anything
remaining in the file would be ignored.
There is another example of the use of a command file in
the demonstration GRAFDEMO.BAT. It creates a file called
TEMP.JF by using the DOS ECHO command and you may want to
examine this file.
110
EASIGRAF in batch mode
Using command files with EASIGRAF is difficult, and you
probably will not want to do it until you have become
quite familiar with the program through using it
interactively.
13:2. Creating an MSP file
directly
If a second filename is provided and it ends in the
extension .MSP then instead of being taken to be a file
containing commands it will be used as the name of an MSP
file to which the graph is to be saved:
EASIGRAF HISTO.GRP HISTO.MSP
The graph file HISTO.GRP would be displayed on the screen
and then immediately the screen image would be saved in
Microsoft Paint format to the file HISTO.MSP. It could
then be subsequently printed out with PRMSP or altered
further with the Windows Paint program. EASIGRAF quits
after doing this and control is returned to DOS or to the
batch file from which the command has been run.
In order to produce MSP files in this way it is necessary
that the graph file already contains the information to
display the graph exactly as required (for example with
the correct scales and titles) since no further
adjustment is performed.
13:3. Drawing the graphs in
memory
A further feature is supplied which allows EASIGRAF to
draw its graphs in the computer's memory rather than on
screen. No graph is displayed, so obviously the only
usefulness of this is if an MSP file is created which is
saved to disk. The advantage is that it is possible to
create an MSP file without ever putting the computer into
graphics mode. This is useful when using a multitasking
system such as DESQview because EASIGRAF can then be run
from batch files in background without taking the monitor
out of text mode. Either command files or MSP filenames
can be used to get EASIGRAF to run in background in this
way.
The way to select this feature is to set the FG_DISPLAY
environment variable to RAM by entering at the DOS
prompt:
SET FG_DISPLAY=RAM
Thereafter EASIGRAF will run "invisibly" until a
subsequent command is used to set FG_DISPLAY to a value
appropriate to the monitor you have. If you do not
normally have to set FG_DISPLAY at all to get EASIGRAF to
run correctly (because the display type is recognised
automatically) then you can enter:
111
EASIGRAF in batch mode
SET FG_DISPLAY=
This will allow EASIGRAF to return to normal functioning.
Note that because of the way DOS works it is not possible
to set FG_DISPLAY (or any other "environment variable")
from within EASISTAT - see the section on the SYSTEM
command in the EASISTAT documentation.
112