
				   MouseClip

			   Copyright Jason Hood 2000

			     Freeware. Version 1.00


 ===========
 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. An  additional	function is moving the screen cursor to
 the mouse cursor.


 ============
 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.

 A beep is sounded if too many characters are selected - it will store as  many
 as it can. Control characters are converted to spaces.

 The selection can be sent to the Windows clipboard by holding Alt and pressing
 the left mouse button, but only  while  it  is visible. 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 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.


 =================
 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 everything between spaces. Run
 MouseClip with "/D?" to see how to define your own classes, and have a look at
 the "dblclick.cfg" file. There is room for thirty pairs in total.


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

 By holding Alt and pressing the left mouse button (when there	is  no	visible
 selection), it is possible to	move  the  screen  cursor to the mouse. 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
	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 not be the value you specify: at the worst	it  will  be  one  byte
 less; at the best fourteen bytes more.

 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  would	result	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)


 ===========
 Programmers
 ===========

 If you would like to fill/read MouseClip's buffer directly, you can.  Use  Int
 16h, function 81h to determine if it is installed. If it is, AX will be 4d43h,
 CX will be the version number (100h) and ES:BX will point to the  buffer.   In
 addition, ES:[0] points to  the current read point (which will probably be the
 same as BX), ES:[2] points to the end of the text (and so ES:[2] - BX will  be
 the length of the text), and  ES:[4] points to the end of the buffer (ES:[4] -
 BX will be the length of the buffer). The format of the buffer is:

	"first line", 13, 10
	"second line", 13, 10
	"last line", 0

 The terminating NUL is not included in the length.


 ===============
 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@hotmail.com
 http://adoxa.homepage.com/mouseclip/

 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, 8 April, 2000.
