home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / dblib201.zip / MUSCLICK.TXT < prev    next >
Text File  |  1993-02-24  |  6KB  |  119 lines

  1. --------------------------------------------------------------------------------
  2.                                   MusClick.TXT
  3.           The documentation below is for the .BIN file: MUSCLICK.BIN
  4.           and is taken from the header for MusClick.ASM.
  5. --------------------------------------------------------------------------------
  6.        Programmers:    Jay Parsons (Jparsons)
  7.                        and Ken Chan (HazMatZak)
  8.        Inspiration:    Bowen Moursund (Bowen)
  9.                        and the folks at BORBBS
  10.        Date:           July 6, 1992
  11.        Version:        1.1
  12.  
  13.       dBASE usage syntax, after LOAD musclick:
  14.  
  15.       cSuccess = call( "MUSCLICK", "I", [<arg2>] ) && install
  16.       cSuccess = call( "MUSCLICK", "U" )           && uninstall
  17.  
  18.       store chr( 255 ) TO cMRow, cMCol
  19.       call MUSCLICK with cMRow, cMCol              && report row, col
  20.       nMRow = asc( cMRow )
  21.       nMCol = asc( cMCol )
  22.  
  23.      A call with "I" must be made to install the alternate mouse
  24.      event handler for this to work.  After that call, this .bin
  25.      will push a Ctrl-PgUp, or the character specified in the optional
  26.      <arg2> argument to the "I" call, into the BIOS buffer when
  27.      the left mouse button is released.  The <arg2> character must be
  28.      a chr() value from 1 to 254, or the argument may be a string
  29.      composed of two chr() values, the first of which is chr(255) and
  30.      the second of which is the chr() value of the second (high) byte
  31.      of an extended code for a key or key combination that has no
  32.      ASCII value.
  33.  
  34.      For example, a call with a second argument of chr(255) + chr(97)
  35.      will stuff Ctrl-F4.  It is likely that you will want to use a
  36.      key or key combination that has an inkey() and that works with
  37.      ON KEY.  Note that the extended codes are always positive
  38.      and not always the same as the inkey() values.
  39.  
  40.     The installation call will return "T" if successful, and "F" if not.
  41.  
  42.     If the BIOS buffer happens to be full when the mouse button is
  43.     released, the click will go unreported, but the row and column
  44.     will be updated.
  45.  
  46.     If you wish a default character different from Ctrl-PgUp, change
  47.     the DEFAULTKEY value before assembly.  For an extended code,
  48.     set it to the value of the second byte * 256 (100h).  The ESC key
  49.     is the only key that will attract dBASE's attention in the middle
  50.     of a dBASE operation such as "LIST" or "INDEX".  However, that
  51.     operation will be cancelled if ESC is pressed, so consider what is
  52.     going on and whether you want to have it recognize a click.
  53.  
  54.     Calls to get the row and column must have the first argument
  55.     be chr(255), and must have a second argument.  Both MUST be variables.
  56.     A call to find the row and column if no "I" call has been made,
  57.     or no clicks have occurred, will return chr(255) for each.
  58.     The row and column reported are those as of the last click, which are
  59.     not necessarily those current at the time of the call.  They are
  60.     determined by dividing the values in pixels reported by the mouse
  61.     by 8 each and ignoring any remainder.
  62.  
  63.     After one call has been made to get the mouse row and column,
  64.     subsequent calls to get the row and column will return chr(254) for
  65.     each if no click has occurred since the previous call.  This allows
  66.     the dBASE program to differentiate between actual keypresses
  67.     and "keypresses" made by this routine to report mouse clicks.
  68.  
  69.     The recommended way to test for an actual mouse click is to see if the
  70.     row value returned is below 200; all row values 200 and above are
  71.     reserved for future expansion (only 254 and 255 are currently used).
  72.  
  73.     A call with "U" should be made to uninstall the alternate event
  74.     handler before installing it with a different key, and also before
  75.     ending the dBASE program for safety.  Repeated calls to install
  76.     the handler without uninstalling it will overwrite the address of
  77.     the dBASE handler and prevent restoring it.
  78.  
  79.     The dBASE mouse-event handler is disabled while the one in this
  80.     .bin is installed.  Consequently, dBASE will not know of the
  81.     current mouse position or click status, and calls to the .bins
  82.     in the recent Technotes article, uploaded as MOUSE_FU.TXT, will
  83.     not return correct information.  Use this .bin or those, but not
  84.     both at once.
  85.  
  86.             Following are as specified by Microsoft for its mouse:
  87.  
  88.     Register usage on call of an alternate event handler
  89.  
  90.             AX = condition mask ( bits 0-4 set for events occurred )
  91.             BX = button state   ( bit 0 set if left button pressed;
  92.                                   bit 1 if right; bit 2, center.) <unused>
  93.             CX = horizontal mouse cursor coordinate in pixels
  94.             DX = vertical    "     "        "        "   "
  95.             SI = last horizontal mickey count ( vertical? )   <unused>
  96.             DI = last vertical mickey count   ( horizontal? ) <unused>
  97.             DS = mouse driver data segment <unused>
  98.  
  99.     Event mask bits, 1 to respond to that event:
  100.              0 = mouse has moved       ( value  1 )
  101.              1 = left button pressed   ( value  2 )
  102.              2 = left button released  ( value  4 )
  103.              3 = right button pressed  ( value  8 )
  104.              4 = right button released ( value 16 )
  105.  
  106.     Thus, if our handler were to be called whenever the mouse moved
  107.     or either button were released, the mask would be 10101, or
  108.     16 + 4 + 1, decimal value 21, rather than the 4 we use because
  109.     we care only about release of the left button.
  110.  
  111.     If an event not specified in our event mask occurs, our handler
  112.     will not be called at all.  If the left button is released, it
  113.     will be called.  AX, the condition mask, will report all events
  114.     that have occurred, not only the one specified in the event mask.
  115.  
  116. --------------------------------------------------------------------------------
  117. End of File: MUSCLICK.TXT
  118. --------------------------------------------------------------------------------
  119.