 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Laszlo
Joined: 14 Feb 2005 Posts: 4001 Location: Pittsburgh
|
Posted: Tue Apr 04, 2006 4:35 am Post subject: |
|
|
| Another idea: instead of sending wheel events, if these funny windows are below the mouse, send scroll up or down events. |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Tue Apr 04, 2006 11:29 am Post subject: |
|
|
| Laszlo wrote: |
| Code: | CoordMode Mouse, Screen
Loop 31
S%A_index% := Round(.5*1.222**A_Index)*(120 << 17) ; doubled, to optimize code
#MaxThreadsPerHotkey 2
WheelDown::
WheelUp::
Speed := 1 + 300//(A_TickCount-Tick0+10)
Tick0 = %Tick%
Tick = %A_TickCount%
WCnt += S%Speed%
If (Tick < WTick + 30)
Return
WTick = %Tick%
MouseGetPos m_x, m_y, WinID, Ctrl
PostMessage 0x20A,((A_ThisHotKey="WheelUp")-.5)*WCnt,(m_y<<16)|m_x,%Ctrl%,ahk_id %WinID%
WCnt = 0
Return |
|
I will stick with this version atm |
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1238
|
Posted: Tue Apr 04, 2006 12:17 pm Post subject: |
|
|
| Quote: | | instead of sending wheel events, if these funny windows are below the mouse, send scroll up or down events |
I thought of just sending WheelUp/Down in the first place, but I don't see that there's any way to direct a wheel event at a specific control... ControlClick doesn't have an option for the Wheel, only other mouse buttons (and ControlSend can't send mouse-related actions). |
|
| Back to top |
|
 |
travis.hume Guest
|
Posted: Fri May 05, 2006 7:13 pm Post subject: Great script but doesn't work with Eclipse "Fast View&q |
|
|
| If you aren't familar with the Eclipse programmers IDE then disregard, but if you do use Eclipse ... The script does not scrool "Fast View" windows. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4001 Location: Pittsburgh
|
Posted: Fri May 05, 2006 7:20 pm Post subject: |
|
|
| Have you tried replacing the wheel event messages with scroll up or down messages? |
|
| Back to top |
|
 |
travis.hume Guest
|
Posted: Fri May 05, 2006 7:29 pm Post subject: Thanks! |
|
|
| For the quick reply and that changed worked great. |
|
| Back to top |
|
 |
travis.hume Guest
|
Posted: Fri May 05, 2006 10:37 pm Post subject: I take it back |
|
|
That didn't work. I've never written any AHK script ... so I tried changing
PostMessage 0x20A to
PostMessage 0x115
Which stops all scrolling on any window. I'll keep reading. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4001 Location: Pittsburgh
|
|
| Back to top |
|
 |
RobOtter
Joined: 30 Jan 2005 Posts: 125 Location: Darmstadt, Germany
|
Posted: Sat May 06, 2006 1:22 pm Post subject: |
|
|
To add some items to the bug list, not only Laszloīs latest script but all other scripts also do not work with Firefox, Internet Explorer and - because the same control is used - the content pane of Windows Help (hh.exe): These controls do not scroll any more even if the window has the focus!
I donīt think I have a very special system setup, just a german XP Pro SP2, admin rights, no other scripts or window manipulating software running.
Is it really just me having probs with these obvious programs? |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4001 Location: Pittsburgh
|
Posted: Sat May 06, 2006 4:27 pm Post subject: |
|
|
| It could be a mouse driver issue. Maybe it does not generate the proper wheel events. These scripts work for me in MSIE6 and Windows Help (XP SP2 US-English). Have you tried MS IntelliMouse? Also, there are mouse settings in TweakUI. |
|
| Back to top |
|
 |
RobOtter
Joined: 30 Jan 2005 Posts: 125 Location: Darmstadt, Germany
|
Posted: Sat May 06, 2006 4:48 pm Post subject: |
|
|
| Laszlo wrote: | | It could be a mouse driver issue. |
Good point!
I already use the latest version of IntelliPoint and also IntelliType. Maybe these programs interfere in some way because I found a very strange behavior:
My MS keyboard also has a scroll wheel - and exactly in the windows where the mouse wheel is disfunctional, the keyboard wheel works!
So for me the solution will be using KatMouse which works fine with my hardware combination.
Nevertheless, thanks for pointing me in the right direction - it saved me a lot of investigation! |
|
| Back to top |
|
 |
TheLeO
Joined: 11 Jun 2005 Posts: 160 Location: England ish
|
Posted: Sun May 14, 2006 3:16 pm Post subject: |
|
|
I personally can't stand laggy scrolling, it's horrible..
but i really like the idea of scrolling windows under the mouse,
I used Testers first script and changed it a little.
The scipt below uses the fact that:
if you scroll outside of the active window, the window usually doesnt pick up the event.
it doesn't stop *natural* scroll wheel events. but rather sends additional scroll events to windows underneath the mouse if the window below the mouse is not the active one(preventing double scrolling)..
works fine for most of the windows, but some times/occasionnaly you get the inventalbe bug of both windows scrolling.
I the usefullness makes up for the bug.
| Code: |
CoordMode Mouse, Screen
WheelTime = 500
WheelDelta:= 120 << 16
WheelMax := 4 * WheelDelta
~WheelUp::
~WheelDown::
WinGet, V_CurrentWindowID, ID, A
MouseGetPos,,, V_WinUnderMouseID
WinGetTitle, V_CurrentWinTITLE, ahk_id %V_CurrentWindowID%
WinGetTitle, V_WinUnderMouseTITLE, ahk_id %V_WinUnderMouseID%
If ( ((V_CurrentWinTITLE) = (V_WinUnderMouseTITLE)) AND ((V_CurrentWindowID) = (V_WinUnderMouseID)) )
Return
Critical
If (A_ThisHotKey <> A_PriorHotKey OR A_TimeSincePriorHotkey > WheelTime)
WCnt = %WheelDelta%
Else If (WCnt < WheelMax)
WCnt+= WheelDelta
MouseGetPos m_x, m_y
hw_m_target := DllCall("WindowFromPoint", "int",m_x, "int",m_y)
If (A_ThisHotKey) = "~WheelUp"
SendMessage 0x20A, WCnt, (m_y<<16)|m_x,,ahk_id %hw_m_target% ; WM_MOUSEWHEEL
Else
SendMessage 0x20A,-WCnt, (m_y<<16)|m_x,,ahk_id %hw_m_target% ; WM_MOUSEWHEEL
return |
_________________ And i say: where there is a problem , there is a solution.(well some where that is.)
::
I Have Spoken
:: |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 320
|
Posted: Thu Feb 21, 2008 7:53 am Post subject: |
|
|
I'm using the first accelerated version of shimanov's code. Thanks to all involved here. But I don't know clearly yet where and how this "KatMouse" functionality will improve my workflow?
| Laszlo wrote: | | I tried to add some wheel acceleration code to Shimanov's script. Experiment with this |
| Code: | CoordMode Mouse, Screen
WheelTime = 500
WheelDelta:= 120 << 16
WheelMax := 4 * WheelDelta
WheelUp::
Critical
If (A_ThisHotKey <> A_PriorHotKey OR A_TimeSincePriorHotkey > WheelTime)
WCnt = %WheelDelta%
Else If (WCnt < WheelMax)
WCnt+= WheelDelta
MouseGetPos m_x, m_y
hw_m_target := DllCall("WindowFromPoint", "int",m_x, "int",m_y)
SendMessage 0x20A, WCnt, (m_y<<16)|m_x,,ahk_id %hw_m_target% ; WM_MOUSEWHEEL
return
WheelDown::
Critical
If (A_ThisHotKey <> A_PriorHotKey OR A_TimeSincePriorHotkey > WheelTime)
WCnt = %WheelDelta%
Else If (WCnt < WheelMax)
WCnt+= WheelDelta
MouseGetPos m_x, m_y
hw_m_target := DllCall("WindowFromPoint", "int",m_x, "int",m_y)
SendMessage 0x20A,-WCnt, (m_y<<16)|m_x,,ahk_id %hw_m_target% ; WM_MOUSEWHEEL
return |
|
|
| Back to top |
|
 |
RobOtter
Joined: 30 Jan 2005 Posts: 125 Location: Darmstadt, Germany
|
Posted: Thu Feb 21, 2008 8:54 am Post subject: |
|
|
| automaticman wrote: | I'm using the first accelerated version of shimanov's code. Thanks to all involved here. But I don't know clearly yet where and how this "KatMouse" functionality will improve my workflow?
|
Thatīs an easy one: It improves it in the same way the scripts listed here - it will save you a lot clicks since you donīt have to activate the area you want to scroll by clicking it. A good example is the Windows Explorer: to scroll in either the tree view (left pane) or the file list (right pane), just move the mouse over the pane and go scrolling - no need to click into the pane (and eventually lose selection of files).
I personally prefer KatMouse over these scripts because I use it for years now and it works flawlessly at all times. Why should I bother finding out if one these scripts do also? KatMouse is also freeware and has a small footprint, too. |
|
| Back to top |
|
 |
automaticman
Joined: 27 Oct 2006 Posts: 320
|
Posted: Thu Feb 21, 2008 9:04 am Post subject: |
|
|
| RobOtter wrote: | | I personally prefer KatMouse over these scripts because I use it for years now and it works flawlessly at all times. Why should I bother finding out if one these scripts do also? KatMouse is also freeware and has a small footprint, too. | Thanks for further examples. I can understand your point. Btw. even if KatMouse would use much more resources there's also another principle: "Never change a running system." (This is especially true for Vista users who give away anyway lots of resources.)
? What is the most flexible use for the middle mouse button (as we have found a very good one for the wheel now). I would like to make it dependent on the used application. KatMouse seems to have an option for "pushing windows into the background" if I understood it correctly from the description on its website. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|