home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / batch / sputils.zip / ASKMOUSE.DOC next >
Text File  |  1991-01-06  |  3KB  |  86 lines

  1. Ask Mouse  version 1.2 (C) Copyright SPETER SOFTWARE,   December 1990.
  2.  
  3. This program allows mouse or keyboard input for batch files.
  4. Uses the up/down cursor keys or a MS compatible mouse (if available).
  5. The program sets the Dos ErrorLevel to allow batch selection branching.
  6.  
  7. NOTE:  The program only works in text screen modes.
  8.  
  9. The program was written in Borland's Turbo Pascal 5.5
  10.  
  11. Usage:
  12. -------
  13. 1:   AskMouse [/h]
  14.  
  15.         Output a help screen.
  16.           /h       (optional)
  17.  
  18. 2:   AskMouse  x1 y1  x2 y2  <valid-characters>  x y [/t] [/m]
  19.  
  20.         Get user input (using a mouse if available).
  21.           (x1,y1) - (x2,y2)     define the limits of mouse movement
  22.           valid-characters      allows for "hit-keys"
  23.                                 (use "*" to match any letter)
  24.           (x,y)                 initial mouse cursor position
  25.           /t       (optional)   do NOT display or use the text cursor
  26.           /m       (optional)   do NOT display or use the mouse cursor
  27.  
  28.           x's                   are in the range  [1..80]
  29.           y's                   are in the range  [1..25]
  30.  
  31. Returns:
  32. --------
  33.    errorlevel = 100 + mouse line (1..25) - when a mouse button is pressed;  or
  34.    errorlevel = 100 + text cursor line (1..25) - when <enter> is pressed;   or
  35.    errorlevel = 200 + position in list (1..n) - when a character is pressed
  36.  
  37. Examples:
  38. ---------
  39. 1:   AskMouse 1 10 25 15 mtydka 5 12
  40.  
  41. Limit the mouse to the area between column 1 of line 10 and column 25 of line
  42. 15;  initially place the mouse at column 5 of line 12.
  43.  
  44. The user's options are to:
  45.    *  move the mouse to one of the lines and press either mouse button; or
  46.    *  use the cursor keys to move the cursor and press <enter>; or
  47.    *  press one of the valid keys (m,t,y,d,k or a).
  48.  
  49. The following table gives some of the possible results from the command line
  50. above:
  51.  
  52.     ACTION                                                   ERRORLEVEL
  53. --------------------------------------------------------     ----------
  54. a mouse button pressed, with the mouse cursor on line 12        112
  55. <Enter> key pressed, with the text cursor on line 14            114
  56. letter "d" pressed                                              204
  57.  
  58. 2:   AskMouse 1 10 25 15 "" 5 12 /t
  59.  
  60. As above, but without character "hit keys", and without the text cursor.
  61.  
  62. 3:   AskMouse 1 10 25 15 mtydka* 5 12
  63.  
  64. As in (1), but in addition to the specified "hit keys", match any other letter
  65. pressed with the "*".
  66.  
  67. 4:   AskMouse 1 10 25 15 * 5 12 /m
  68.  
  69. As in (1), but match any letter pressed (*), without using the mouse.
  70.  
  71. Correspondence:
  72. ---------------
  73.     Please address any comments to:
  74.  
  75.         Stephen Peter
  76.  
  77.     INTERNET:
  78.         steve@cad0.arch.unsw.oz.au
  79.  
  80.     POST:
  81.         SPETER SOFTWARE
  82.         P.O. BOX 643
  83.         LANE COVE
  84.         NSW  2066
  85.         AUSTRALIA
  86.