[net.micro.pc] KEYFAKE - Dummy key depression

schuler@gondor.UUCP ( Are you a turtle?) (04/27/86)

#!/bin/sh
echo 'Start of pack.out, part 01 of 01:'
echo 'x - key-fake.doc'
sed 's/^X//' > key-fake.doc << '/'
X                            KEY-FAKE.COM
X
X        A Program, used with Batch Files, which will preset the
X     keystroke responses required when a Program loads.
X
X        This Program was published in the December 24, 1985 Issue of
X     PC MAGAZINE in an article by Charles Petzold on page 215.
X
X        This interpretation of the Article is by Bill DeGain of the
X     PHOENIX IBM-PC USER GROUP.
X
X                                RULES
X
X     1-  KEY-FAKE MUST be invoked PRECEDING your Program Command !
X
X     2-  The responses following the Command 'KEY-FAKE' are limited to 124
X         keystrokes.
X
X     3-  Filenames or strings must be contained within single or double
X         quote marks. The last string response may omit the final quote 
X         mark.
X
X     4-  Each response must be delimited by a Space.  Unless contained in
X         single or double quote marks, a Space is read by KEY-FAKE as a
X         seperate response.
X
X     5-  You may use lower ASCII Codes 'as is'....for example:
X               key-fake "color,14,1,1" 13 "cls" 13
X               basica
X         (will call BASICA, SET COLOR, RETURN, CLEAR SCREEN,RETURN)
X
X     6-  To use extended ASCII Codes, precede the Code with the 'AT' (@)
X         (you must have ANSI.SYS in CONFIG.SYS File first)
X       
X         example:  key-fake "color,14,1,1" 13 "cls" 13 @61
X                   basica
X         (adds to ex: in 5 above a simulated  F3  keypress)
X
X
X                              EXAMPLES
X
X     A-   For a Program which asks for a filename to load and the Sub-
X          directory in which it is located:
X                   key-fake "%1" 13 "\sub-dir name" 13
X                   programname  
X          (this .bat will accept your Commandline 'batname filename'
X           and substitute the filename at the "%1")
X          You could even use "%2" in place of "\sub-dir name" if you
X          type 'batname filename sub-dirname' for the Command Line.
X
X                               (more)
X
X
X
X                        KEY-FAKE  examples cont.e
X
X
X     B-   Turbo Pascal prompts for "Include Error Messages Y/N?"
X            TUR.BAT
X             key-fake "y"
X             turbo
X           (will skip the error message for you)
X
X     C-    Print several Files with one batch command with WORDSTAR:
X           WSP.BAT
X             cd\wordstar
X             :check
X             IF /%1==/ GOTO end
X             Key-fake "P%1" 27 "X"
X             ws
X             SHIFT
X             GOTO check
X             :end
X                        
X             Execute by typing   WSP file1 file2 file3
X             If no filename is present the batch ends.
X             If you typed one, as above, the first file1 name is
X                substituted for %1.
X             So you get the P for Print and the file1.
X                an Escape(27)...and an X for eXecute. 
X             After Printing the first file, SHIFT substitutes file2
X                for %1 and repeats.
X             When no more filenames are there, the batch ends.
X
X     D-     To do a FILE RETRIEVE each time you enter LOTUS 1-2-3.
X            LOT.BAT
X             cd\lotus
X             Key-fake 0 13 0 13 0 13 0 13 0 13 "/FR"
X             lotus
X            (skips by all the preliminaries, FAST)
X
X       There are more examples in the Article which should be read
X      in its entirety.  You can see the usefulness of this Program
X      and the Author should be commended.  It opens up batch files
X      to much broader uses than before.
X       
X                              GOOD LUCK !
X/
echo 'x - key-fake.uuu'
sed 's/^X//' > key-fake.uuu << '/'
Xbegin 644 key-fake.com
XMZ8,`2T59+49!2T4@*$,I($-O<'ER:6=H="!#:&%R;&5S(%!E='IO;&0L(#$Y
XM.#4`````A@$`^RZ`/C4!`'0)"N1T"H#\`70@+O\N+P%3+HL>,P$NBP=#0RZ)
XM'C,!+OX.-0%;"\!TS\]3+HL>,P$NBP=;"\!U#2Z#!C,!`B[^#C4!"\#*`@#'
XM!@`!``#&!@(!`/R,RBO`CL"^``&+_KDO`/.F="Q`CL`[PG7MQ@8!`"<KP([8
XMH5@`+J,O`:%:`"ZC,0'ZQP98`#8!C`Y:`/L.'[Z``+^&`2:)/C,!)L8&-0$`
XMK)B+R$$+P'4#Z2<!Z9L`````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````````````JL@#Z&`@!T&3H&
XMA@)T"RKDJR;^!C4!ZVN0Q@:&`@#K8Y`\0'4(Q@:(`@'K+9`\(G0$/"=U!J*&
XM`NL?D#PP<AH\.7<6Q@:'`@$L,(8&B0+V)HH"``:)`NLKD(`^AP(!=2.@B0(J
XMY(`^B`(!=0*&Q*LF_@8U`<8&AP(`Q@:(`@#&!HD"`$ET`^EW_[J&`L,`````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
X*````````````````
X`
Xend
/
echo 'Part 01 of pack.out complete.'
exit