 


































                 General Software Corporation

                           Presents

      Working with the Logitech(R) Mouse and Clipper(R)


                   Programmer:Joel Kosmich











The mouse project was created out of a need to have
Clipper(R) read the mouse as an alternative input device.
All procedures have been test with Logitech(R) mouse software
3.2 and 3.4.  Any inquiries to this and other fine software
applications can be directed to :

General Software Corporation
325 Tenth Street
Lakewood, NJ 08701
(800)242-2277












































Chapter 1 Creating the Mouse menu:

Logitech(R) so graciously has given the applications
developer the ability to have the mouse become a part of his
software system. I have found the mouse greatly improves user
acceptance to a program if programed properly.

The first step is to create the necessary files in order to
have the mouse programs become compatible the application you
are writing. This is accomplished by creating a DEF file to
handle the ascii key sequences the mouse is send to your
program.  The DEF file can be any ascii file.

Example

SD.DEF


Line 1 contains the following line

BEGIN LeftB, MidB, RightB, LeftM, RightM, UpM, DownM, 50,100
************************************************************
where Leftb  = Left Button
      MidB   = Middle Button
      RightB = Right Button

      LeftM  = Left Motion
      RightM = Right Motion
      UpM    = Upwards Motion
      DownM  = Downwards Motion

       50 & 100 are the sensitivity levels the mouse travels
       the higher the numbers the less sensitive the mouse is
       to movement .
*************************************************************

Line 2-8 contain the following lines

LeftB: Type ENTER  ; Enter is sent to the program
MidB:  Type 3      ; Ctrl-C is sent to the program
RightB: Type ESC   ; Escape sequence is sent to the program

LeftM:  Type 0,75   ; Left Arrow Key
RightM: Type 0,77   ; Right Arrow Key
UpM:    Type 0,72   ; Up Arrow Key
DownM:  Type 0,80   ; Down Arrow Key


After these line lines are typed in you may now compile
this file. As follows:

Newmenu SD <Enter>

You will have (hopefully) a file named SD.MNU on your disk.
This is the actual file Logitech(R) uses to load your menu
file.
After the necessary menu file is created you can load the
driver you just created.


Chapter 2 Click The brains of the show


You that you have a custom mouse menu, the next step is to
have the driver be recognized by the mouse when the program
is loaded from the DOS prompt. The file that controls this is
called CLICK.EXE. In order to modify this file you must edit
the file to insert the name of the EXE or COM file so click
can recognize your file at load time.

step 1

edit the file called CLICK.src

add the name of your EXE or COM file to the list or strip out
what you do not need.

example SD is also the name of my Clipper(R) file

CLICK.SRC:

SD menu 2400 150 3buttons Mm

SD   = name of the Clipper(R) file name
menu = name of the menu driver to load before the start of
       your Clipper(R) program.
2400 = Baud rate the mouse is using (Default)
150  = Report Rate of data into the mouse (Default)
Mm   = Protocol to which the mouse receive input (Default)

Menu = the name of the menu you created for this program. It
       will load automatically for you at the start of the
       program.


Chapter 3 Using the mouse with Clipper(R)


At the DOS Prompt type:

MOUSE
(if you have loaded the MOUSE.SYS disregard this step)
Menu
Click
(BY default these programs are loaded with GOMOUSE.BAT)


If all went well you will have a working mouse menu driver
for your program.
Chapter 4 Clipper(R) Test program


Through out this document I have referred to the SD.EXE
program Clipper(R) has generated. We here it finally.


*Program Name:SD.prg
*Purpose: Demonstrate the Clipper - mouse interface
*Programer: J.Kosmich
*Date of creation: 7/22/88

Set wrap on
clear
@ 5,4 to 9,23 double
mch = 0
Do while lastkey() <> 27
     @ 5,10 prompt 'Choice A'
     @ 6,10 prompt 'Choice B'
     @ 7,10 prompt 'Choice C'
     @ 8,10 prompt 'Choice D'
     menu to mch
     if mch > 1
        quit
     endif
     @ 12,10 say 'Press the Right Button to Quit the Program'
Enddo



This above demo program will show when the mouse is move in a
direction the high-light bar will move and when the right
button is pressed the program terminates.


I do hope this little guide helps the programer. All of this
material can be found in the Logitech(R) user's Manual.
