home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / NETWORK / SOSS31.ZIP / DOC / KEY-FAKE.DOC < prev    next >
Encoding:
Text File  |  1990-06-23  |  3.4 KB  |  70 lines

  1.           KEY-FAKE                               Charles Petzold
  2.  
  3.           ______________________________________________________
  4.  
  5.  
  6.  
  7.           Purpose:  Supplies the series of keystrokes needed to
  8.  
  9.                     initialize an application program on boot-up.
  10.  
  11.  
  12.  
  13.           Format:   KEY-FAKE ["xyz"] [nn] [0] [@F]
  14.  
  15.                     Programname
  16.  
  17.  
  18.  
  19.                     Characters typed within a pair of single or
  20.  
  21.                     double quotes ("xyz") are normal ASCII-
  22.  
  23.                     character keystrokes.  Numbers (nn) not in
  24.  
  25.                     quote marks are ASCII decimal codes, e.g., 13
  26.  
  27.                     (Enter), 26 (Ctrl-Z), or 27 (Esc).  Numbers
  28.  
  29.                     preceded by @ are the extended ASCII decimal
  30.  
  31.                     codes (128 through 255) generated by the Alt
  32.  
  33.                     keys, cursor keys, Ins and Del keys, and the
  34.  
  35.                     Function keys (e.g., @61 is the F3
  36.  
  37.                     keystroke).  The 0 is used with programs that
  38.  
  39.                     check the keyboard buffer (it tells such
  40.  
  41.                     programs the buffer is clear, so the programs
  42.  
  43.                     will treat the succeeding keystroke
  44.  
  45.                     separately).
  46.  
  47.  
  48.  
  49.           Remarks:  KEY-FAKE is of greatest use in batch files
  50.  
  51.                     used to call up application programs.  For
  52.  
  53.                     example, to enter Lotus's 1-2-3 and set it
  54.  
  55.                     for File Retrieve, the following .BAT file
  56.  
  57.                     would be appropriate:
  58.  
  59.  
  60.  
  61.                     CD \LOTUS
  62.  
  63.                     KEY-FAKE 0 13 0 13 0 13 0 13 0 13 "/FR"
  64.  
  65.                     LOTUS
  66.  
  67.  
  68.  
  69.                     This takes you past the necessary initial
  70.  
  71.                     carriage returns and /FR command without
  72.  
  73.                     having to type them in each time.
  74.  
  75.  
  76.  
  77.                     Similarly, if each time you enter BASICA you
  78.  
  79.                     want to have a blue border, blue background,
  80.  
  81.                     and yellow letters, you would create a batch
  82.  
  83.                     file, B.BAT, containing the lines
  84.  
  85.  
  86.  
  87.                     KEY-FAKE "COLOR 14,1,1" 13 "CLS" 13
  88.  
  89.                     BASICA
  90.  
  91.  
  92.  
  93.                     Notes:
  94.  
  95.  
  96.  
  97.                     1.   The keystroke sequence stored by KEY-
  98.  
  99.                          FAKE is limited to 124 characters and
  100.  
  101.                          must be on one continuous command line.
  102.  
  103.                          Keystrokes not supported by PC BIOS
  104.  
  105.                          (e.g., Alt-Home) cannot be stored.
  106.  
  107.  
  108.  
  109.                     2.   Programs such as XyWrite II that get
  110.  
  111.                          keyboard information directly from the
  112.  
  113.                          hardware keyboard interrupt will bypass
  114.  
  115.                          KEY-FAKE.  KEY-FAKE will also not work
  116.  
  117.                          well when you are on-line using a
  118.  
  119.                          communications program.
  120.  
  121.  
  122.  
  123.                     3.   KEY-FAKE is memory resident, but can be
  124.  
  125.                          executed multiple times in the same
  126.  
  127.                          session without reloading.  However, if
  128.  
  129.                          nested batch files cause it to be re-
  130.  
  131.                          invoked before its initially stored
  132.  
  133.                          keystroke sequence has been exhausted,
  134.  
  135.                          the remaining initial keystrokes will be
  136.  
  137.                          lost.
  138.  
  139.