
				   MouseClip

			   Copyright Jason Hood 2002

			     Freeware. Version 1.10


 ===========
 Description
 ===========

 MouseClip is a resident program (TSR) that uses the mouse to copy and paste in
 DOS  text  modes.  It can copy both blocks and streams, and has a configurable
 double-click mode. Text can also be pasted as a stream, and copied to and from
 the Windows clipboard.  In addition, the cursor can be moved to the mouse.


 ============
 Requirements
 ============

 286+
 Extended keyboard
 Mouse
 Hand (two recommended)


 ============
 Installation
 ============

 Add mousclip.exe to your autoexec.bat. If you are using Windows,  add	the  /w
 option  and  do the same again to your StartUp group (ie. "mousclip.exe /w" in
 both autoexec.bat and StartUp).


 ==============
 Selecting Text
 ==============

 Text is selected by using the left mouse button. There  are  numerous	methods
 available, depending on requirements:

 BLOCK: A block is a rectangular area of text. This is	the  normal  method  of
 selection  and  is  done by pressing to define one corner, and dragging to the
 opposite corner.

 STREAM: A stream is a region between two characters.  Hold Shift when pressing
 the button to use this method. It is not necessary to keep holding Shift.

 LINE: Complete lines can be selected by holding Ctrl. It is not  necessary  to
 keep holding Ctrl.

 WORD: A word is chosen by  double-clicking.   The  definition	of  a  word  is
 anything you want (see "Character Classes").

 WRAPPED LINE: A wrapped line is one line that has exceeded  the  screen  width
 and  continued  onto  the  next line(s).  A line is deemed wrapped if the last
 character of this line and the first character of the	next  are  not	spaces.
 Hold Shift while double-clicking to select this.

 PARAGRAPH: A paragraph is a group of lines between two blank lines.  Hold Ctrl
 while double-clicking.

 BLOCK PARAGRAPH: A block paragraph is the same as a paragraph, but the leading
 and trailing spaces are removed. Hold Shift+Ctrl while double-clicking.

 In order to select a single character, it is necessary to hold the button  for
 half a second (to distinguish between cursor movement - see below).

 A beep is sounded if too many characters are selected - it will store as  many
 as it can. The NUL character (character 0) is converted to a space.

 The selection can be sent to the Windows clipboard by holding Alt and pressing
 the  left  mouse  button.  If	you  hear  a  beep,  it means the clipboard was
 unavailable, but it should work the second time.

 The selection will remain visible until a  right  click  is  performed,  or  a
 graphics  operation  (int  10h)  is  done.  Sometimes the selection may not be
 erased, but don't worry about it, it's only an optical illusion.


 ============
 Pasting Text
 ============

 Text is sent to the keyboard by pressing and then releasing  the  right  mouse
 button.  The  last line does not have an Enter, so hold Ctrl to insert one. If
 you would rather have a stream of characters instead  of  lines  (using  Space
 instead of Enter), hold Shift.  To paste from the Windows clipboard, hold Alt.
 If the clipboard is unavailable, empty, or contains too much  text,  you  will
 hear  a  beep. Note that the keys are only tested on press, so you can release
 them before pasting.


 =================
 Character Classes
 =================

 A character class is used to define what can be selected  by  double-clicking.
 There	are  three  classes  available, selected by Shift, Ctrl and Shift+Ctrl,
 along with Alt and left click. The default classes can be used to select words
 and  numbers,	filenames  and	URLs (default), and strings (everything between
 spaces). Run MouseClip with "/D?" to see how to define your own  classes,  and
 have a look at the "dblclick.cfg" file for examples of other classes. There is
 room for thirty pairs in total.


 ===============
 Cursor Movement
 ===============

 By quickly pressing and  releasing  the  left	mouse  button  (within	half  a
 second), it is possible to move the screen cursor to the mouse cursor. This is
 done by simulating the pressing of the arrow keys.


 =======
 Options
 =======

 A number of options  exist  to  control  the  behaviour  (and	appearance)  of
 MouseClip. Options are specified (and separated) by "/" or "-". Briefly:

	B - Define the buffer size
	M - Define the marker
	D - Double-click customization
	N - Mouse handler saving
	W - Windows
	R - Reactivate
	L - Load low
	U - Un-install
	Q - Quiet: only error messages (should be first)
	H - Usage help
	? - Version info and option help


 B - Buffer size

 The default size is enough for half a screen, ie. 1025 = (80+2) * 25 / 2  (the
 +2 is for CR+LF, to end lines).  The maximum is 12800.  The actual size of the
 buffer may be slightly more than the value you specify.

 M - Marker

 The marker is the value used to indicate the selection.  The  default	is  85,
 which	inverts  the  red  and blue components of the foreground and background
 colors.  Specified without a number it becomes 119, which inverts  all  colors
 (good for monochrome monitors).  Making it 0 results in no visible selection.

 D - Double-click

 This is a multi-purpose option - it both selects the current class to use  and
 defines a new one. To select the class to use, use the number 1, 2 or 3 - 2 is
 the default. To define the class, add "=" and the definition after the number.
 Classes  can be defined from a file by using "/D=filename". An example file is
 provided as "dblclick.cfg".

 N - Mouse handler saving

 If you run a program that uses  the  mouse,  MouseClip  will  become  dormant.
 However,  if  you  shell  to  DOS  from  within  that	program, MouseClip will
 reactivate itself. Once the shell is completed,  the  original  mouse	routine
 will  be  restored. This behaviour can be turned off with this option - either
 permanently at install time, or as a toggle after installation.

 W - Windows

 Win9x provides its own mouse driver for DOS programs. This option  at	install
 time  allows  MouseClip to bypass the mouse installed test, allowing MouseClip
 to be used across multiple DOS sessions. However, it is also necessary to  add
 it to your StartUp group, to reactivate MouseClip after Windows loads.

 R - Reactivate

 If you choose to disable mouse handler saving,  this  option  will  reactivate
 MouseClip after using a program that supplied its own mouse routine.


 =============
 Return Codes
 =============

 0   - No problems
 1   - No problems, but already installed
 255 - Errors (including help displays)


 =========
 Upgrading
 =========

 MouseClip now loads itself high, so  you  should  remove  any	LOADHIGH/LH  or
 INSTALLHIGH statements, or use the new /L option.

 Cursor movement is now done via a quick press/release; it is necessary to hold
 the  button  to select a single character. This also allows Alt and left click
 to always copy to the clipboard.

 Pasting is done on the release of the right button,  but  the	key  flags  are
 still	tested	on  press.  This allows text to be pasted correctly, should the
 program receiving the text test the key flags itself.

 Programmers: the API has been removed (the buffer offset is no longer returned
 in BX). Contact me and we'll create a _proper_ API.

 For more complete version information look at the source.


 ===============
 Acknowledgments
 ===============

 Jrgen G. Weber for PC-Mouse. This program is a modified version of his.
 Grant B. Gustafson's xPC-Mouse for the idea of cursor movement, character
 classes and usage display.


 =======
 Contact
 =======

 jadoxa@yahoo.com.au
 http://mouseclip.adoxa.cjb.net/

 Jason Hood
 11 Buckle Street
 North Rockhampton
 Qld 4701
 Australia


 ============
 Distribution
 ============

 The original zipfile can be freely distributed, by any means. However, I would
 like  to  be  informed  if  it  is  placed  on a CD-ROM (other than an archive
 compilation).	Modified versions may be distributed, as long as  the  original
 zipfile is included (I would prefer to be contacted).


 ===============================
 Jason Hood, 21 September, 2002.
