************************************************************************ KEYTAP - Keystroke Simulator (C) Copyright 1992-1995 Neil Faulks. All Rights Reserved. ************************************************************************ KEYTAP allows you to run a program whilst simulating a sequence of keystrokes. The command to be run is given as an argument to KEYTAP, together with the list of keystrokes. When the list of keys is exhausted control is returned to the keyboard, unless the program has already terminated. The key list may be stored in a file, and the name of the file given to KEYTAP. Delays can be inserted into the stream of keys, to allow a user time to read output, or time for an application to finish processing. KEYTAP has many uses such as allowing menu driven applications to be run from the command line. KEYTAP runs the application program by invoking a copy of COMMAND.COM, it also remains resident whilst the program is running, but, unlike some other utilities, does not remain in memory once the application has terminated; it is not a TSR. This program is SHAREWARE, which means that you are allowed to use it free for a period of up to 30 days, after this time you must pay for it if you wish to continue using it. Refer to the file ORDER.DOC for ordering information. The shareware version of KEYTAP prints a short message when it starts and when it exits, but imposes no delays or keypress requirements. The registered version is completely silent in operation. Otherwise the program and documentation are identical between the shareware and registered versions. Usage You use keytap like this: KEYTAP // is the name of the program that you want to run. is the list of keystrokes that are to be fed to the program. The double slash ("//") is used to separate the command (which may also have its own parameters or options) from the list of keys. Any spaces between the // and the key list are ignored. The key list may be placed in a file, in which case the following syntax is used: KEYTAP // @file There can only be one filename given on the command line, and it must not be followed by any characters such as spaces. If the command is omitted, a new copy of COMMAND.COM is started, allowing any commands to be typed. The Key List All characters in the keylist, including spaces, are fed to the application as if the user had typed them. For example KEYTAP keycode // hello Would cause the characters "h", "e", "l", "l" and "o" to be fed to the KEYCODE program (a utility application provided with KEYTAP). If you try this you must press Esc to leave KEYCODE. However, a "[" (left bracket) character is not sent to the application: it is used to enter special key names. For example, in the above example you had to press Esc to leave KEYCODE. You can get KEYPRESS to press Esc for you by using the [esc] keyname: KEYTAP keycode // hello[esc] In the above example KEYCODE will be terminated by the Esc keystroke, which will cause KEYTAP to terminate also. This example shows the use of ALT keys: KEYTAP keycode // [a][b][c][esc] NOTE: If the key list is being read from a file Line-Feed characters, normally found at the end of each line, are sent to the application as RETURN key presses. This means that lines in the file correspond to lines of commands. Key Names Several keynames are available to press common control and function keys. ALL keycodes may be generated by using the KEYCODE program to find the correct keycode and then placing the code in square brackets, refer to the end of this section. For the following names it does not matter if they are in upper or lower case: [ret] [esc] [bksp] [up] [down] [left] [right] [a] ... [z] Alt keys [^a] ... [^z] Ctrl keys [F1] ... [F12] function keys [@F1] ... [@F12] Alt function keys [$F1] ... [$F12] Shifted function keys [^F1] ... [^F12] Ctrl function keys [=#] Delay for # seconds [1234] key with scancode 1234 The supplied KEYCODE program may be used to get the scan code of any key on the keyboard, so every key may be simulated by KEYTAP. For example running KEYCODE and pressing Alt-\ gives the display: 2B00 So you might use it like this: KEYTAP command // [2B00] KEYCODE also shows any printable character associated with a key, this is for your information only: it is not needed by KEYTAP. Example This example runs COMMAND.COM to get a directory listing: KEYTAP // dir[ret]exit[ret] Hints on Using Keytap Some applications ignore keystrokes entered whilst they are starting up, deliberately flushing the keyboard buffer. You will need to use a delay at the start of a key list for such applications. Problem applications Some applications do their own keyboard handling to provide special "features", or are strange in other ways. KEYTAP cannot work with them properly. This includes the following: EDIT.COM (MS-DOS editor) Registration and Payment Registration and Payment is required if you continue to use KEYTAP after an initial trial period of 30 days, from the date of first use. You must pay for this software if you wish to continue to use it legally. The registration fee helps to pay for the further development of this and other software. KEYTAP costs just œ12 or $19 world-wide, for which you will receive a version registered to you personally and without the registration reminders. The price includes postage and packing or Email transfer, and technical support. Technical support is also available before purchase, to help you decide if KEYTAP meets your needs. Cheques should be in UK Pounds Sterling, drawn on a UK bank, and sent to the following address: Neil Faulks 96 Middle Lane Crouch End London England N8 8NT Enquiries may be telephoned to +44 171 873 2007 (24Hr), Faxed to +44 171 258 0717, or Emailed to neil@dcs.kcl.ac.uk or from CompuServe: INTERNET:neil@dcs.kcl.ac.uk or 100417,1251 (A faster response may be had from the internet address) Orders are welcome from any country in the world. For more details and a printable order form refer to the file ORDER.DOC End of File