Name    : MOUSEHIDE.DLL
Version : 1.2
Purpose : Hide mouse cursor when key is pressed
Platform: Litestep load-module
Author  : Pavel Vitis
Date    : August 14, 2000



 Description 

This module automatically hides mouse cursor after defined count of keystrokes
or after mouse inactivity, so cursor does not cover typed text.
After any mouse activity the cursor is automatically revealed.



 Version history 

1.2
  * Improved *MouseHideIgnore - Now testing ClassName and/or executable name
  * Improved mouse hiding mechanism
  * Fixed bug - Mouse hiding at startup
  + Module is not loaded if no mouse detected
  + Added !MouseMove bang
  + Added X,Y parameters to !MouseShow and !MouseHide
  * Tested on Windows Millennium

1.1
  * Do hide after key-up event only, ignore key-down. Solves key+drag bug.
  * Do not hide mouse while mouse button is down (timed hide during mouse drag)
  + Added MouseHideStartupDelay
  + Added MouseHideStartupSound (to aid setup of correct startup delay)
  + Added *MouseHideIgnore - experimental

1.0
  * Initial release. Tested on Win98 / build 0.24.5, 10/21/99.



 Installation 

1. Copy all .DLL files into same directory.
2. Load module in step.rc as:

 LoadModule path_to_module\mousehide.dll

3. Define variable:

 MouseHideKeyCount - Amount of keystrokes needed to hide cursor (default is 1)

4. Try it, play with settings, tweak it, report bugs, be happy... ;)



 Reference 


Commands:

 ; Amount of keystrokes needed to hide cursor (default is 1)
 MouseHideKeyCount

 ; Timeout in ms to hide mouse after inactivity (0 = never, default)
 MouseHideTimeout

 ; Sound played on mouse hide
 MouseHideSound <path>

 ; Sound played on mouse hide
 MouseShowSound <path>

 ; Startup delay in seconds - Install keyboard/mouse hook after another
 ; startup programs do.
 MouseHideStartupDelay <sec>

 ; Play sound when hook is installed
 MouseHideStartupSound <path>


Bangs:

 !MouseHideEnable
   Enable module

 !MouseHideDisable
   Disable module (does not show mouse, if hidden!)

 !MouseHideToggle
   Toggle module

 !MouseHideKeyCount n
   Change keystroke count needed to hide mouse

 !MouseHideTimeout ms
   Change timeout for timed mouse hide

 !MouseMove X Y
   Move mouse. Mouse is moved even when hidden.

 !MouseHide [F] [X Y]
   Hide mouse
   F = forced, mouse activity doesn't reveal cursor (optional)
   X and Y are screen coordinates to move mouse when show (optional)

 !MouseShow [X Y]
   Show mouse (only way how to show forced hidden cursor)
   X and Y are screen coordinates to move mouse when show (optional)

Other:

  *MouseHideIgnore "ClassName" ["ExecutableName"]

  Sets windows which will be ignored by MouseHide. "ExecutableName" can be
  empty/left-out.

  Function (schematic):

    if (class_name_of_window_under_mouse_cursor == ClassName) {
      if (ExecutableName == '')
        do_not_hide_mouse
      else
        if (application_executable_name == ExecutableName)
          do_not_hide_mouse
    }

  For examples look in mousehide.rc file.
  To help determine ClassName and ExeName, use enclosed GetWinInfo utility.



 Known problems 

1. To avoid interference please do not forget to unload another mouse-hide
applications (for example CursorHider).

2. Some mouse utilities (Shove-It) when loaded after mousehide.dll may cause
problems / bad module function. To avoid this, always load mousehide.dll *after*
these utilities, i.e. use MouseHideStartupDelay.

3. One user reported mouse not hiding in MS Outlook Express 5. Not tested yet.

4. When mouse is hidden and !Popup bang is issued (via hotkey), popup will show
outside of screen. You should show mouse first. Use this:

  *Hotkey !MouseShow !Popup
    or
  *Hotkey !MouseShow 0 0 !Popup
    to popup menu at top left corner



 Notes 

  In all settings where path to wave file should be specified, you may use one of
   following predefined names to play system event sounds:

  SYSTEMSTART
  SYSTEMEXIT
  SYSTEMHAND
  SYSTEMASTERISK
  SYSTEMQUESTION
  SYSTEMEXCLAMATION
  SYSTEMWELCOME
  SYSTEMDEFAULT

  To help retrieve desired window class- and executable-name, use enclosed
   GetWinInfo utility.

  Use some non-numeric character for X or Y parameter you want to preserve,
   i.e., bang:
     !MouseMove # 100
   will set Y coordinate to 100, leaving X coordinate as is


Pavel Vitis
mailto:pavel.vitis@seznam.cz
http://floach.pimpin.net/pavel/ (main site)
http://lsg.come.to/ (mirror site)