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 >
Text File  |  1992-06-30  |  6KB  |  199 lines

  1.  
  2.  
  3.      Chapter 13: EASIGRAF IN BATCH MODE
  4.  
  5.      Instead of running EASIGRAF interactively, it is possible
  6.      to set it to run automatically from a command file in a
  7.      similar way to EASISTAT, although the procedure is not
  8.      quite so straightforward. The main purpose is so that
  9.      graphs can automatically be modified and saved in
  10.      Microsoft Paint format from a DOS batch file, and if you
  11.      familiar with the use of batch files you may find this
  12.      feature helpful.
  13.  
  14.  
  15.      13:1. Using a command file
  16.  
  17.      To use a command file you must run EASIGRAF as follows:
  18.  
  19.      EASIGRAF graphfile commandfile
  20.  
  21.      The command file can have any name as long as it does not
  22.      have the extension .MSP. It contains the keys that you
  23.      would press to use EASIGRAF interactively. Where EASIGRAF
  24.      is just asking for one key to be pressed at a time then a
  25.      number of letters can all be put on one line. Where
  26.      EASIGRAF is asking for a whole line of information then
  27.      this must be entered in the command file on a new line.
  28.      The underline symbol "_" (above the hyphen on the
  29.      keyboard) has the same effect as pushing the ENTER key
  30.      and the caret symbol "^" (above the 6 on the keyboard)
  31.      has the same effect as pushing the ESCAPE key.
  32.  
  33.      Example command file:
  34.  
  35.      mk1
  36.      a567
  37.      0,0.5,0.1
  38.      0,2,1
  39.      _
  40.      F1
  41.      fred.msp
  42.      _
  43.  
  44.      The first line turns off the main menu, selects the "Key"
  45.      menu and toggles off the key. The end of the line has the
  46.      same effect as pushing ENTER and so the "Key" menu is
  47.      left and one returns to the main menu. Then the "Axes"
  48.      menu is selected, the X and Y scales are toggled on and
  49.      the option to rescale the axes is selected. The third and
  50.      fourth lines then provide the new X and Y scales. The
  51.      underscore provides an ENTER to leave the "Axes" menu and
  52.      return to the main menu. F1 selects the "Files" menu and
  53.      the option to save in MSP format and the next line gives
  54.      the filename to use. The final underscore acts as an
  55.      ENTER to leave the file menu. When there is nothing left
  56.      in the command file control returns to the user, or
  57.      alternatively the command file could finish with a Q (for
  58.      quit) in which case EASIGRAF would finish and anything
  59.      remaining in the file would be ignored.
  60.  
  61.      There is another example of the use of a command file in
  62.      the demonstration GRAFDEMO.BAT. It creates a file called
  63.      TEMP.JF by using the DOS ECHO command and you may want to
  64.      examine this file.
  65.      
  66.        110 
  67.         EASIGRAF in batch mode 
  68.      
  69.      Using command files with EASIGRAF is difficult, and you
  70.      probably will not want to do it until you have become
  71.      quite familiar with the program through using it
  72.      interactively.
  73.  
  74.  
  75.      13:2. Creating an MSP file
  76.      directly
  77.  
  78.      If a second filename is provided and it ends in the
  79.      extension .MSP then instead of being taken to be a file
  80.      containing commands it will be used as the name of an MSP
  81.      file to which the graph is to be saved:
  82.  
  83.      EASIGRAF HISTO.GRP HISTO.MSP
  84.  
  85.      The graph file HISTO.GRP would be displayed on the screen
  86.      and then immediately the screen image would be saved in
  87.      Microsoft Paint format to the file HISTO.MSP. It could
  88.      then be subsequently printed out with PRMSP or altered
  89.      further with the Windows Paint program. EASIGRAF quits
  90.      after doing this and control is returned to DOS or to the
  91.      batch file from which the command has been run.
  92.  
  93.      In order to produce MSP files in this way it is necessary
  94.      that the graph file already contains the information to
  95.      display the graph exactly as required (for example with
  96.      the correct scales and titles) since no further
  97.      adjustment is performed.
  98.  
  99.  
  100.      13:3. Drawing the graphs in
  101.      memory
  102.  
  103.      A further feature is supplied which allows EASIGRAF to
  104.      draw its graphs in the computer's memory rather than on
  105.      screen. No graph is displayed, so obviously the only
  106.      usefulness of this is if an MSP file is created which is
  107.      saved to disk. The advantage is that it is possible to
  108.      create an MSP file without ever putting the computer into
  109.      graphics mode. This is useful when using a multitasking
  110.      system such as DESQview because EASIGRAF can then be run
  111.      from batch files in background without taking the monitor
  112.      out of text mode. Either command files or MSP filenames
  113.      can be used to get EASIGRAF to run in background in this
  114.      way.
  115.  
  116.      The way to select this feature is to set the FG_DISPLAY
  117.      environment variable to RAM by entering at the DOS
  118.      prompt:
  119.  
  120.      SET FG_DISPLAY=RAM
  121.  
  122.      Thereafter EASIGRAF will run "invisibly" until a
  123.      subsequent command is used to set FG_DISPLAY to a value
  124.      appropriate to the monitor you have. If you do not
  125.      normally have to set FG_DISPLAY at all to get EASIGRAF to
  126.      run correctly (because the display type is recognised
  127.      automatically) then you can enter:
  128.  
  129.  
  130.  
  131.      
  132.        111 
  133.         EASIGRAF in batch mode 
  134.      
  135.      SET FG_DISPLAY=
  136.  
  137.      This will allow EASIGRAF to return to normal functioning.
  138.  
  139.      Note that because of the way DOS works it is not possible
  140.      to set FG_DISPLAY (or any other "environment variable")
  141.      from within EASISTAT - see the section on the SYSTEM
  142.      command in the EASISTAT documentation.
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.      
  198.        112 
  199.