----------- - OBBUF - ----------- Version 3.2 (C) 1994 ALL RIGHTS RESERVED! (Ondrej Blazek) Quickly growing tired of software that constantly prompts for setup configurations, a user name or some other form of annoying input every time you run it? Ever wish you could run software with defaults which are not present? What about your favourite word processor automatically starting with the RETRIEVE option selected? Or add a default spread sheet page to almost any spreadsheet program that doesn't support one. All this and more can be done using OBBUF. Sure, you have seen many program on the market that place keystrokes into the keyboard buffer, but OBBUF is different. Not only does OBBUF give you access to the normal characters keys, but it also supports a wide range of control key (Control keys refer to keys such as ALT, CTRL, SHIFT, TAB, ESC, ARROW KEYS, etc.) and all of this with a full 255 or 1024 character buffer (and not some feeble 15 or 16 character buffer which other similar programs are limited to). 1.1 SYNTAX ------------ The syntax is easy. There are only two rules to obtain any key combination that is needed: 1. Any text that is to be copied character for character simply follows the command OBBUF. Text can contain any combination of characters, including spaces, with the exception of the following: ~ < > | To obtain the above characters use the method described below. 2. Any special key is proceeded with the ~ key. The ~ marker should be followed directly by the SPECIAL KEY name (ie. no space). For a complete list of special keys, see appendix A. 1.2 USING OBBUF ----------------- OBBUF can be used directly at the DOS prompt or called by a batch file. In most cases OBBUF will be used in a batch file because using OBBUF directly at the DOS prompt will cause OBBUF to echo the text and any control keys directly to the screen as soon as it is called. To use OBBUF, it is first necessary to determine which keys OBBUF needs to press and then OBBUF, outfitted with the proper keystrokes, is placed in a batch file directly before the program that is to gain the benefit of these keystrokes. Consider an theoretical word processing program called POWER WRITE which is stated in DOS by the command PW. Lets imagine that when the program is started it displays a title page and waits for the user to press any key. Once the editor is started, a file can be retrieved using the ALT-F key combination to open the FILES menu and then the R key needs to be pressed (for Retrieve option). Lastly the theoretical program asks for a search pattern and displays all the files fitting the pattern (ie. *.DOC, *.TXT, etc.). If we wanted OBBUF to pass the title page and enter the retrieve option listing all *.TXT files, we would create a batch file which would contain the following commands: OBBUF A~AFR*.TXT~ENTER PW Looking at the parameter passed to OBBUF we can see that the first letter is an A. This will pass the title page (and could have been any character). The next character is a ~ character indicating a special key. In this case the special key is just the letter A indicating that the next character will be combined with the ALT key. As can be seen the next character is F and thus the ALT-F combination is produced. After the F is an R which enters the Retrieve option and then the characters *.TXT are pressed. Lastly another ~ character indicates another special key and the next five letters determine this special key to be the ENTER key. 1.3 LIMITATIONS ----------------- 1.3.1 SPACES There is one other slight limitation to the text combination. If multiple spaces follow each other only ONE space will be pressed. To obtain multiple spaces after each other used the special key concept to obtain the other spaces. For example: OBBUF Hello My Name Is Bob is the same as OBBUF Hello My Name Is Bob 1.3.2 BUFFER LENGTH As was already stated the maximum number of characters that can be pressed by OBBUF is 255 (demo version, 1024 with a fully registered version of the program). When entering DOS batch files, there is a limit on the number of character that can be use per line. Especially if you are using a lot of special keys, this DOS limit may seem to reduce this limit even further, but this is NOT so... OBBUF is designed to append multiple calls to itself as long as the 255 character limit is not passed. This means that calls to OBBUF which can not be placed on one line can be divided into multiple calls to OBBUF. For example: OBBUF Hello My Name Is BOB is the same as OBBUF Hello My Na OBBUF me Is BOB 1.5 OPTIONAL PARAMETERS ------------------------- OBBUF supports three optional parameter which are changed through the DOS variable environment. To view the current setup of OBBUF, type the following: OBBUF SETUP Each parameter (OBBUF, OBSIZE and OBSPEED) can be changed using the DOS command SET followed by the parameter, and equal sign and then the new value of the parameter. Each parameter is discussed below. 1.5.1 OBBUF The OBBUF parameter tells the OBBUF program where to store its data file. OBBUF creates a data file (about 12 bytes in size) which it stores in on the drive and in the directory specified by the OBBUF parameter. If the OBBUF parameter is not used the default is the root directory of the current drive. 1.5.2 OBSIZE OBBUF is a TSR based program which launches a TSR into memory if the normal keyboard buffer can not handle the entire string that is to be pressed. This parameter tells the OBBUF program how large the NORMAL keyboard buffer is. The default is 15 character. Specifying numbers larger than the actual keyboard buffer size will prevent OBBUF from launching the TSR module and will result missing keystrokes. 1.5.3 OBSPEED Normally OBBUF does not generate a delay in between keystrokes, to generate the fastest possible output (a special version for fast computers is coming soon). Even at its fastest rate the keystrokes appear to be typed and do not instantly appear on the screen. If this effect is desired, it can be amplified by setting the DOS enviromental variable OBSPEED to SLOW. Note that OBBUF also automatically eliminates keys that nagate each other, for example two calls of ~TNL will not do anything while three calls of ~TNL will toggle the Num Lock once. If you wish to use either Num Lock, Scroll Lock or Caps Lock as a flashing light, place a space in between every 2nd toggle call and erase the space every other call. The SET commands can be used in the AUTOEXEC.BAT file to set up the OBBUF configuration. Since OBBUF re-reads the status of these parameters before processing, any changes made to the parameters will be employed during the next call to the OBBUF program. 1.6 HOW IT WORKS ------------------ OBBUF is in part a TSR (Terminate and Stay Resident) which remains in memory and constantly checks a memory segment (set aside by OBBUF when it is first executed) for any keystrokes in the OBBUF buffer. If any keystrokes appear, they are removed from the memory segment and placed into the real keyboard buffer where the usual keyboard interrupt takes care of them. Because OBBUF is capable of determining if it is in memory or not, the second time it is called, OBBUF only modifies this memory segment instead of placing itself in memory again (this saves memory because the TSR is NOT re-installed for each OBBUF call). Version 2 of OBBUF contains a checking routine which avoids calling the TSR if the number of keys (to be pressed) is less than or equal to the size of the "real" keyboard buffer. 2.0 PROGRAM BUGS AND UPDATES ------------------------------ Version 1.0 TSR only version. No access to toggle keys. 1.1 Access to toggle keys installed. 1.15 Fixed ~TSL toggling Numlock and vice versa bug. 1.2 Scan Code option added. 2.0 Check for using TSR only if need, was installed. 2.1 Fixed toggle key problem for non-TSR processing 3.0 Fixed problem with multi command line appending 3.1 Improved OBBUF to any number of keystrokes * 3.2 Added slow option ** 4.0 Added multi keystoke processing for fast computers * Current OBBUF 3.2 versions is OBBUF1024, but can be adapted for any buffer size upon demand. Custom size buffers available to registered users only. ** Version 4.0 is available to registered members only. (This version is still in the works) 1.7 APPENDIX A ---------------- Special Key Command Special Key Effect ~A Next Character with ALT ~S Next Character with SHIFT* ~C Next Character with CTRL ~F1 ... ~F12 Function Keys (1 through 12) ~UP Up Arrow ~DOWN Down Arrow ~RIGHT Right Arrow ~LEFT Left Arrow ~ESC Escape ~TAB Tab ~GTS > ~LTS < ~PIP | (Pipe) ~TID ~ (Actual Character) ~BS Backspace ~BACKSPACE Backspace ~ENTER Enter ~HOME Home ~END End ~PGUP Page Up ~PGDN Page Down ~DEL Delete ~INS Insert ~TCL Toggle Caps Lock ~TNL Toggle Num Lock ~TSL Toggle Scroll Lock ~N0 ... ~N9 Numeric Key Pad (0 to 9) ~N. Numeric Key Pad . ~N+ Numeric Key Pad + ~N- Numeric Key Pad - ~N/ Numeric Key Pad / ~N* Numeric Key Pad * ~NUP Mum Key Pad Up Arrow ~NDOWN Num Key Pad Down Arrow ~NRIGHT Num Key Pad Right Arrow ~NLEFT Num Key Pad Left Arrow ~NCENTRE Num Key Pad Center ~NPGUP Num Key Pad Page Up ~NPGDN Num Key Pad Page Down ~NDEL Num Key Pad Delete ~NINS Num Key Pad Insert ~NENTER Num Key Pad Enter ~NHOME Num Key Pad Home ~NEND Num Key Pad End ~~000XXX ASCII character #xxx where xxx is a 3 digit DEC value ~~XXXYYY SCAN code #xxxyyy where xxx and yyy are each a 3 digit DEC value The ~ followed by a space will force a space (see section 1.3.1). * The ~S command works both ways, thus the case of the character is switched. This means that ~Sa is A and ~SA is a. ---------------------- - SHAREWARE 1994! - ---------------------- This program is 100% SHAREWARE and can be copied and distributed under the following rules: 1) None of the files may be altered in any way especially, but not limited to, any of the credits (in this file or the main program), notes or the program name. 2) The main program must always be accompanied by this DOC file. 3) And there is to be no fee charged for any copying or distribution of this program excluding shipping and handling charges. Under the SHAREWARE agreement you may preview this program for 30 days with no obligation. If you find OBBUF useful and continue to use it after the 30 day trial period please send a registration fee of $10 to $20 dollars to the address below. Registered users will be able to obtain special personalized versions of OBBUF along with legal rights to change the name of the program as long as the credit message is unchanged. Personalized versions of OBBUF will include user chosen "special key" names, options to skip copyright message and best of all a buffer size that suits the user. Send your Registration Fee, Comments or Bugs to the Programmer: Ondrej Blazek 847 Ludgate Cr. Kingston, Ontario K7M 6C7 CANADA Special Thanks to Terry.C.Stewart for the Scan Codes list. (Finally one of my programs one step above your, eh Terry?!)