topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday October 12, 2024, 7:32 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Universal Hand Tool for Scrolling  (Read 9722 times)

skywalka

  • Member
  • Joined in 2005
  • **
  • Posts: 254
    • View Profile
    • Donate to Member
IDEA: Universal Hand Tool for Scrolling
« on: August 12, 2007, 06:17 AM »
Hi guys.

I've been using Adobe Reader a lot lately.  Now, when I am in any application that I need to scroll within (eg web browser) I find myself instinctively trying to use the handtool featured in Adobe Reader.  Problem is the hand tool is not universal.  And that's why I'm here.  Why can't the handtool be available whenever left-clicking is not going to perform any other function?

Thanx 4 looking.

Nighted

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 572
  • Meat Popsicle
    • View Profile
    • Nighted@deviantART
    • Donate to Member
Re: IDEA: Universal Hand Tool for Scrolling
« Reply #1 on: August 13, 2007, 05:04 PM »
Oh boy....you haven't heard of MouseImp?

Does just what you want. Make sure you use the proper DLL if you want Firefox functionality. Or you can use the Grab and Drag extension for Firefox.
I`m a firm believer in the philosophy of a ruling class, especially since I rule.
« Last Edit: August 13, 2007, 05:06 PM by Nighted »

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: IDEA: Universal Hand Tool for Scrolling
« Reply #2 on: August 14, 2007, 03:39 PM »
Here's an AHK script that gives basic, vertical hand tool functionality when holding CAPS + right mouse button + dragging. It should work for all programs that use mousewheel up/down to scroll up/down. Change the sensitivity through the xsens variable in the code if needed. It's very limited though: no horizontal scrolling, no drag hand icon. So if you already have a mouse with a scrollwheel then it's not so very useful. Still it lets you do long scrolls a bit faster and with more "flow" I think.

By the way, Easy Window Dragging (that I built this upon) is extremely useful - try it anyone who hasn't yet.


; Easy Window Scrolling
; adapted from Easy Window Dragging
; http://www.autohotkey.com/docs/scripts/EasyWindowDrag.htm

CapsLock & RButton::
CoordMode, Mouse  ; Switch to screen/absolute coordinates.
MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin
WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin%

SetTimer, EWD_WatchMouse, 10 ; Track the mouse as the user drags it.

xsens = 20     ;<------- change sensitivity here if needed
return

EWD_WatchMouse:
GetKeyState, EWD_RButtonState, RButton, P
if EWD_RButtonState = U  ; Button has been released, so drag is complete.
{
    SetTimer, EWD_WatchMouse, off
    return
}

; Otherwise, scroll to match the change in mouse coordinates
; caused by the user having dragged the mouse:
CoordMode, Mouse
MouseGetPos, EWD_MouseX, EWD_MouseY
ychange := EWD_MouseStartY - EWD_MouseY
SetWinDelay, -1   ; Makes the below move faster/smoother.
if ychange > %xsens%
 SendInput {WheelDown}
if ychange < -%xsens%
 SendInput {WheelUp}


EWD_MouseStartX := EWD_MouseX  ; Update for the next timer-call to this subroutine.
EWD_MouseStartY := EWD_MouseY
return

skywalka

  • Member
  • Joined in 2005
  • **
  • Posts: 254
    • View Profile
    • Donate to Member
Re: IDEA: Universal Hand Tool for Scrolling
« Reply #3 on: August 15, 2007, 04:16 AM »
Oh boy....you haven't heard of MouseImp?

Does just what you want. Make sure you use the proper DLL if you want Firefox functionality. Or you can use the Grab and Drag extension for Firefox.
Thanx Nighted!

That's exactly what I'm looking for.
Here's an AHK script that gives basic, vertical hand tool functionality when holding CAPS + right mouse button + dragging. It should work for all programs that use mousewheel up/down to scroll up/down. Change the sensitivity through the xsens variable in the code if needed. It's very limited though: no horizontal scrolling, no drag hand icon. So if you already have a mouse with a scrollwheel then it's not so very useful. Still it lets you do long scrolls a bit faster and with more "flow" I think.

By the way, Easy Window Dragging (that I built this upon) is extremely useful - try it anyone who hasn't yet.
Nod5, that script is largely unresponsive for me.  Rather than troubleshoot, I'll stick with MouseImp for now.  But, thanx for taking the time to write post that.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: IDEA: Universal Hand Tool for Scrolling
« Reply #4 on: August 16, 2007, 05:52 PM »
Yes, I have to admit it's pretty dodgy after testing it again here.  ;D The right click context menu keeps popping up now and then even though it isn't supposed to. Not sure why. The script only took a few (fun) minutes to piece together from the Easy Window Dragging code so. I actually just recently discovered the Easy Window Dragging script and liked it a lot and had thought about expanding it somehow. So this was good practice. Other ways to expand it that I've since found really useful are: CAPS + middle mouse ---> minimize the window under the mouse pointer , CAPS + shift + move mouse = resize window under mouse pointer.

skywalka

  • Member
  • Joined in 2005
  • **
  • Posts: 254
    • View Profile
    • Donate to Member
Re: IDEA: Universal Hand Tool for Scrolling
« Reply #5 on: August 17, 2007, 12:39 AM »
From my brief experience using the CAPS key for a hotkey isn't a good choice because you have to reset it.  Or is the CAPS key supposed to work without physically holding it down?  I tried using your script without holding the key down but it wouldn't work but maybe it did work & it was the unresponsive problem making it appear that it didn't...blah...blah...blah

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: IDEA: Universal Hand Tool for Scrolling
« Reply #6 on: August 17, 2007, 01:25 PM »
But when you use CAPS as a hotkey combo in AHK then it isn't (by default) supposed to change the usual toggle mode of the CAPS button I think. So whatever you had it set to before stays set afterwards. And that's how it works when I try it at least. You can put ~ before a hotkey to force AHK to not block the native function though

skywalka

  • Member
  • Joined in 2005
  • **
  • Posts: 254
    • View Profile
    • Donate to Member
Re: IDEA: Universal Hand Tool for Scrolling
« Reply #7 on: August 17, 2007, 02:46 PM »
Well, I felt pretty stupid asking that.  Halfway through typing up my post I thought there must be a better way to waste 2 minutes of my life...BUT...I just tried it out & you were spot on.  When you finish utilising the script's functionality it restore's the setting.

Thanx 4 the heads up.