Hot Scroll 0.80      (C) 1998  Samuel Audet <guardia@cam.org>

THIS IS A FREEWARE UTILITY!!  Please send an e-mail if are using this
program, thank you!  If you can spare some $MONEY$ for a pre-university
student, it would be very much appreciated.  See Contacting the Author
section.

Contents
========

   1. Introduction
   2. Usage
   3. Tested Software
   4. Things to come
   5. Legal Stuff
   6. For Programmers
   7. Acknowledgments
   8. Contacting the Author


Introduction
============

Hot Scroll does about the same thing as Microsoft IntelliMouse, Logitech
FirstMouse+/MouseMan+, Mouse Systems ProAgios/ScrollMouse, Kinsington
Internet Mouse, Fellowes Browser, Genius EasyScroll/NetScroll/NetMouse, and
IBM ScrollPoint, but instead of using a second roller, it uses the mouse
movement itself with _no special hardware_.  Also, Hot Scroll works for
_both_ horizontal and vertical scrolling AT THE SAME TIME!! Try to beat
that...

I wonder why Microsoft IntelliMouse only works with Office 97, Internet
Explorer 4, and some others.  I won't spend US$50-80 on a mouse just to
laugh at it, especially that the other companies say their roller works
with any Windows software. Some even have 4 or 5 buttons!  ...?

I first saw such a feature in an Amiga browser, IBrowse last year.  As I
learned programming, I forgot about it, but then I saw Microsoft made such
a beast, but ah! with special hardware, for specific software and limited
features of course... Intellimoose. :) This reminded me of what I seen on
the Amiga and I thought I might as well make such a thing, but for OS/2. If
you are also using a Mac with MacOS, check Scroll Magick!!
http://www.edenware.com/scrollmagick.html

You'll notice the mouse doesn't follow the scroll bars like usual.. I had a
problem:  scroll bars don't have anything for pixels.  In any case, knowing
the physical length of the scroll bar and its range, I was able to do
something not too shabby.  It works quite well, as you can see below.

Check my home page for more great PM/WPS Enhancers and BackTalk!


Usage
=====

Loading/Installation
---------------------

Load using "loader l".  You can also add the DLL to the LoadOneTime key in
the SYS_DLLS application of OS2.INI.  "Install.cmd" is provided for this
purpose.

How to use it, two methods
--------------------------

1. Give focus to a window with scroll bars and activate Scroll Lock.  The
   pointer will be positioned in the best position to scroll (unless the
   leash is active), and this will leave both the mouse and keyboard free.
   Move the mouse around, type, click, etc. Deactivate Scroll Lock.

2. Put the pointer over a window to scroll, keep the selected keys and
   buttons down, and move around.  Remember that key combination leaves the
   mouse free (well, I'm not sure of it's usefulness with some keys like
   alt, ctrl or shift are down) and that mouse combination leaves the
   keyboard free, unless both are used.  Also, actions that were already
   performed by some keys or buttons are still and always active.

Note: If more than one scroll bar has the same parent, Hot Scroll will use
      the one under or beside the mouse pointer when activated.

Parameters
----------

Hot Scroll comes with a bunch of user definable parameters using
loader.exe.  The parameters are saved in HOTSCRL.INI.  Make sure it always
follow HOTSCRL.DLL

Syntax:

loader <l/u/s> [-l] [-o] [-m] [-r] [-e] [-s <speed %>] [-n <pos/pix>]
               [-a] [-c] [-f] [-k] [-1] [-2] [-3] [-?]

Note: Follow options by + to activate, - to deactivate and nothing to toggle.

l   Loads Hot Scroll hook (Note: Use s to activate new parameters instead).
u   Unloads Hot Scroll hook (only if loaded by loader.exe).
s   Saves and sets parameters and also loads Hot Scroll.

-l  Scroll Lock method.

-o  No focus lock. This will make Hot Scroll follow focus changes for the
    Scroll Lock method without the need to press Scroll Lock again.

-m  Mouse Leash.  I don't know of any API that actually stops the mouse, so
    what I had to do is to reset the mouse position constantly.  You will
    see the mouse trying to escape.

-r  Fake Instant Redraw.  WARNING this is a kludge!!  It may give screen
    corruption in certain situations.  This gives instant redraw to apps
    that normally don't have any when using Hot Scroll.  For example
    DeScribe, FaxWorks, and OS/2 System Editor.  Unfortunately, this breaks
    the scrolling of a few other applications that already have instant
    redrawing like Mesa 2, Hyper View PM, and VIEW.EXE.  An interesting
    side effect is that it makes folder scroll smoother.

-e  Reversed Scrolling.  Not very useful IMHO, unless you want to get
    confused, but someone wanted this, so it's there.  You can get somekind
    of pseudo-"hand manipulation" with this and the non-proportional mode,
    but the latter needs a different value for _everything_.

-s  Factor for the speed of the scrolling.  As a referencze, a value of
    100% requires the mouse to travel from one end to the other of the
    scroll bar to entirely scroll the window.

-n  Instead of scrolling proportionally to the scroll bar range and length,
    here you can define how much positions the scrolling is to move for
    each pixel of mouse movement (you'll have to see by yourself what it
    does in your applications).  This is never active in Scroll Lock mode
    as it doesn't make any sense.

Keys that must be down to scroll.

-a  Alt
-c  Ctrl
-f  Shift
-k  Defines a custom key.  When activating this parameter, you will be
    asked to type a key in.
-1  Mouse Button 1
-2  Mouse Button 2
-3  Mouse Button 3

-?  Shows the help screen.


Examples
--------

   Mouse button 1 and 2 at a speed of 1.75:
      [C:\]loader s -1+ -2+ -s 1.75

   Non-proportional mode of 5 positions per pixel with mouse leash and
   fake instant redraw:
      [C:\]loader s -n 5 -m+ -r+


Unloading/Uninstallion
----------------------

You can unload it with "loader u".  If it was added to OS2.INI, you can
uninstall it with "uninst.cmd"

Using the PM interface
----------------------

Unfortunately, it doesn't seem to be possible to keep a hook loaded after a
PM program's execution.  So if you intend to use the PM interface, it will
need to be kept running.

Press OK to activate the changes you have made.

If error messages appear in red at the bottom of the screen, you can
dismiss them by clicking on them.

The program will keep it's window state saved after being closed.  That
means that it will start minimized if it was closed minimized (like at
shutdown).

Yes I used a BeOS Icon... arg, icons are hard to do.  If you can make a
good one, send it over!


Tested Software
===============

Here's software I've tried Hot Scroll with.

Work
----
   Netscape - Now try what's called REAL browsing!  *COOL*!
   The WPS - Folders, Window List, etc.
   Mesa 2 - Doesn't work with Fake Instant Redraw.
   PMMail
   VIO windows - flickering problem (dragging conflict??) when
                 scrolling outside of the window with MB2 and MB3 only.
   PMView
   The File Dialog
   OS/2 System Editor
   DeScribe 5 - The slider blinks??  The frame seems to receive the
                scrolling messages instead of the client window, weird.
   OpenChat
   UniMaint 5
   Partition Magic 3 - Doesn't work with Fake Instant Redraw.
   FaxWorks 3
   Seek and Scan Files
   VIEW.EXE and VIEWHELP.EXE - Doesn't work with Fake Instant Redraw.
   EPM 6 - The window wraps to the beginning after scrolling to the end ??
   HyperView PM 3.4 - Doesn't work with Fake Instant Redraw.
   ZOC 3
   MR/2 ICE
   WarpAMP
   PM Checksum
   Memsize
   WarpZip
   KAZip
   Archive Folder
   Enhanced E/EE
   Zip Control

Tricky
------

Reason:     Windows with scroll bars cannot have focus.
Workaround: Keep the slider down while pressing scroll lock.
            Use "key/button down" method.

GTIRC 2
WebExplorer

Acrobat Reader - The scroll bars all have different parents, so you can't
                 use both vertical and horizontal at the same time.  And
                 the parents are hidden, the only way to make it work in
                 any (even there not so) useful way is with scroll lock
                 while keeping a scroll bar down.  Also, the right
                 horizontal slider blinks.  Fiuf... I wonder how this
                 program even works.  It's best just to use the already
                 present "hand manipulation".

Don't work
----------
ProNews/2      - Now that's another weird one... for one thing, all scroll
                 bars have the same parent (??!).  Maybe I'll figure it out
                 if I'm lucky, but I don't want to lose time on one
                 program. I've managed to make it half work, but there are
                 still a lot of conflict between the scroll bars I still
                 don't understand.  Ask Panacea to fix that up a bit.

Mixomat        - Don't try it, it's messy and useless.  The author uses
                 scroll bars for the mixer since he finds them more
                 practical than sliders, but they don't actually scroll
                 anything.


Things to come  Remember that $MONEY$ makes miracles for new features!!
==============

- "Hand manipulation" like in Acrobat Reader.

- Different settings for different EXEs.

- Make the scrolling follow a bit more the slider sizes.. maybe, don't know
  if I can make it.

- A different mouse pointer while scrolling.  I tried hard to come up with
  a useful solution, and I wasn't able to do it.  Any PM programmer master
  out there knows how to set the mouse pointer at the end of the hook
  chain?? Subclassing HWND_DESKTOP window procedure maybe (hey, who knows).

- Double clicks?  let me know if you would like this.


Legal stuff
===========

This freeware product is used at your own risk, although it is highly
improbable it can cause any damage.

If you plan on copying me, please give me the credits, thanks.


For Programmers
===============

Source code is free of charge, as long as it's not to make money. Send me a
sign of life and I will send it to you.

If anyone cares, the DLL can be included in any PM Enhancer, and as long as
the latter is free, I will not charge anything, but give me the credits,
thanks.

#define INI_FILENAME "hotscrl.ini"

/* this is for options */
#define SCROLL_LOCK  1
#define BUTTON_1     2
#define BUTTON_2     4
#define BUTTON_3     8
#define ALT          16
#define CTRL         32
#define SHIFT        64
#define CUSTOM_KEY   128
#define LEASH_MOUSE  256
#define NO_FOCUS_LOCK 512
#define FAKE_INSTANT_REDRAW 1024
#define REVERSED 2048
short options = SCROLL_LOCK | BUTTON_3;

char custom_key = 0; /* this holds a scancode */
short speed = 100; /* percentage */
BYTE posperpix = 0;

BOOL EXPENTRY HotScrollHookInit(void);
BOOL EXPENTRY HotScrollHookKill(void);
BOOL EXPENTRY HotScrollWaitLoaded(void);
BOOL EXPENTRY HotScrollLoaded(void);

The INI file holds the following:

Application     Key
-----------     ---
Parameters      Options    ->  options
                Speed      ->  speed
                Custom Key ->  custom_key
                Positions per Pixel ->  posperpix

The hook init automatically loads these parameters from the INI file in its
directory.


Acknowledgments
===============

Thanks goes to:

Robert Mahoney <rmahoney@netusa.net>  This guy rules!


Contacting the Author
=====================
If you have any suggestions, comments or bug reports, please let me know.

Samuel Audet

E-mail:    guardia@cam.org
Homepage:  http://www.cam.org/~guardia
IRC nick:  Guardian_ (be sure it's me before starting asking questions though)

Snail Mail:

   377, rue D'Argenteuil
   Laval, Quebec
   H7N 1P7   CANADA
