Jump to content

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

How to send a smooth scroll signal?


  • Please log in to reply
6 replies to this topic
Shalmu
  • Members
  • 8 posts
  • Last active: Feb 26 2015 12:06 PM
  • Joined: 13 Jun 2014

I only know these:

Send  {WheelDown}

and

Send  {WheelUp}

but they send a whole descrete mouse signal and don't allow a smooth scrolling.

What I want is to be able to send a tiny scrolls, like touchpad does. Is it possible?

 



evilc
  • Members
  • 340 posts
  • Last active: Oct 27 2015 11:07 PM
  • Joined: 17 Nov 2005
AFAIK all mouse wheel scrolls are by a number of "lines".

Start -> Control Panel -> Mouse -> Wheel Tab

Default is 3 lines per wheel roll "click". Try 1?

AFAIK the equivalent of a touchscreen scroll is to hold middle mouse while in a window, then move the mouse up or down.
This would be v difficult, if not impossible to rebind to mouse wheel, because mouse wheel up/down only has a "down event", not an "up event" (ie you cannot tell when the key is "released" as it doesnt work that way).

Even with my logitech mouse that has a free spinning mouse wheel (no clicks), you can only scroll by x lines with the wheel.

Shalmu
  • Members
  • 8 posts
  • Last active: Feb 26 2015 12:06 PM
  • Joined: 13 Jun 2014

Then how does the touchpad on my notebook sends a gradual scroll signal, when I scroll with two fingers? It scrolls somehow, which means it has an input signal for it, hasn't it?



Xtra
  • Members
  • 954 posts
  • Last active: Jul 23 2016 09:04 PM
  • Joined: 29 Sep 2013
Send {WheelDown 1}
 
Send {WheelUp 1}

Try these.



Shalmu
  • Members
  • 8 posts
  • Last active: Feb 26 2015 12:06 PM
  • Joined: 13 Jun 2014

Well, it's the same as {WheelDown}, i.e. it sends one wheel click.



Linear Spoon
  • Members
  • 842 posts
  • Last active: Sep 29 2015 03:56 AM
  • Joined: 29 Oct 2011

You can try this. Of the windows I tested, it had mixed results. Some, like Chrome worked perfectly. Some ignored the delta value and scrolled the default amount anyway. Some didn't respond at all.

;Note +/- 120 seems to be the "default" scroll
WheelUp::PostMW(30)
WheelDown::PostMW(-30)


PostMW(delta)
{ ;http://msdn.microsoft.com/en-us/library/windows/desktop/ms645617(v=vs.85).aspx
  CoordMode, Mouse, Screen
  MouseGetPos, x, y
  Modifiers := 0x8*GetKeyState("ctrl") | 0x1*GetKeyState("lbutton") | 0x10*GetKeyState("mbutton")
              |0x2*GetKeyState("rbutton") | 0x4*GetKeyState("shift") | 0x20*GetKeyState("xbutton1")
              |0x40*GetKeyState("xbutton2")
  PostMessage, 0x20A, delta << 16 | Modifiers, y << 16 | x ,, A
}

Join us at the new forum - http://www.ahkscript.org/

 


tomoe_uehara
  • Members
  • 2166 posts
  • Last active: Jun 11 2015 05:33 PM
  • Joined: 05 Sep 2009
Well.. My script isn't as advance as Linear Spoon tongue.png

WheelUp::
MouseGetPos, x, y
y2 := y-20
Send {Mbutton Down}
MouseMove, %x%, %y2%
Sleep 1000
Send {Mbutton up}
MouseMove, %x%, %y%
return
WheelDown::
MouseGetPos, x, y
y2 := y+20
Send {Mbutton Down}
MouseMove, %x%, %y2%
Sleep 1000
Send {Mbutton up}
MouseMove, %x%, %y%
return

ESC::ExitApp