Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

want to scroll with mouse movement


  • Please log in to reply
4 replies to this topic
flyingsherpa
  • Members
  • 2 posts
  • Last active: Dec 09 2009 02:57 PM
  • Joined: 18 Nov 2009
I had a wonderful little program that came with a serial mouse I used back on a win95 PC. Basically when you clicked and held both mouse buttons simultaneously, moving your mouse scrolled both horizontally and vertically in the window. Letting go of the buttons resumed normal mousing. I used it primarily in Excel for years and it was fantastic... it survived multiple OS and Office version upgrades. But my work computer just got "upgraded" to Office 2007 and it doesn't work anymore, and I feel lost without it.

The middle mouse button click-and-pan is such a poor substitute as to be useless to me.

I've searched the web and have yet to find anything to replicate this functionality (other than buying a special mouse with horizontal scroll titl-wheel, which I can't do because my employer doesn't allow installing any custom mouse drivers). It looks like autohotkey is my best bet, but I'm not sure how to do this.

I've done a little programming in C and matlab (long ago), so I know a few things about it. I'm not asking for anyone to do this for me (unless they want to!), I just want to know if what I want is possible with autohotkey. If it is, I would appreciate a little guidance on where to start with this and I'll put in some time to figure it out. I just don't don't want to spin my wheels if this is not even possible.

My complete guess at a decent algorithm is:

click and hold L+R mouse buttons = scroll-lock on
moving mouse left/right/up/down = scrolls that direction

Appreciate any help!

aaffe
  • Members
  • 1045 posts
  • Last active: Jan 16 2014 01:32 PM
  • Joined: 17 May 2007
Yes, I am almost sure you can do this by ahk.
Look at hotkeys, Getkeystate(), mousegetpos, Send commands.

HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
Have a look here, might help: Auto Scroll For Firefox

JimboJones
  • Members
  • 4 posts
  • Last active: Nov 19 2009 02:58 PM
  • Joined: 17 Nov 2009
Is the only difference between the program that you describe and the middle mouse click functionality built into Excel the fact that it will scroll at a diagonal instead of just one of the left/right/up/down directions?

I personally like the middle mouse click scrolling and if your only issue is that you want to access it by simultaneously clicking the left and right mouse buttons then the code shown below might do it for you. Basically if Excel is the active window and you click the right and left buttons at the same time the script below will release them both and click the middle button instead, activating the built in Excel scroll.

#IfWinActive ahk_class XLMAIN
~LButton::
KeyWait, RButton, D T1
lftchk := GetKeyState("LButton")
if (!ErrorLevel) and (lftchk)
{
	Send {LButton Up}{RButton Up}
	Send {MButton}
}
return


flyingsherpa
  • Members
  • 2 posts
  • Last active: Dec 09 2009 02:57 PM
  • Joined: 18 Nov 2009
No, that's not the issue. You'd have to use both to understand it I guess, but using the scroll program allows me to precisely scroll right and check some numbers and scroll back in literally half a second. Doing the same with the middle click takes several seconds and is so clunky in comparison that I can't get myself to use it... it's just not crisp or precise like the program I'm used to (though perhaps I could learn to be better with the default one). It's as accurate as the scroll wheel... I can go over an exact number of cells and come exactly back to where I was in a split second. When I try to use the middle-click I always overshoot by 50 columns because it's too sensitive. When I slow down, it's just so slow as to not be worth it.

I'd be glad to send a zip file with the scroll program in it to anyone who was interested in trying it (only works on pre 2007 Office). I honestly don't know how people use Excel without it... it'd be like trying to web browse without a scroll wheel. Taking your eyes off of what you're reading to mouse over to a scroll bar really breaks your focus/flow. Everyone I've given it to at work raves about it.

Thanks for the input so far. I'm reading about your suggestions.