AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Send mouse scrolls to window under mouse
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
RobOtter



Joined: 30 Jan 2005
Posts: 125
Location: Darmstadt, Germany

PostPosted: Thu Feb 21, 2008 9:33 am    Post subject: Reply with quote

automaticman wrote:
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.

I do not use the "push down" functionality since I donīt need it. But you can configure another button than wheel button (if your mouse has additional ones) to push down windows. KatMouse has only limited per-application settings: you can deactive support for single applications but can not define different actions of mouse buttons for different apps. I use my mouse driver for these purposes (MS IntelliPoint driver).

But it gets off-topic now... If you have further questions, please email me directly.

regards,
Rob
Back to top
View user's profile Send private message
automaticman



Joined: 27 Oct 2006
Posts: 322

PostPosted: Thu Feb 21, 2008 5:04 pm    Post subject: Reply with quote

shimanov wrote:
Code:
CoordMode, Mouse, Screen
return

WheelUp::
   MouseGetPos, m_x, m_y
   hw_m_target := DllCall( "WindowFromPoint", "int", m_x, "int", m_y )

   ; WM_MOUSEWHEEL
   ;   WHEEL_DELTA = 120
   SendMessage, 0x20A, 120 << 16, ( m_y << 16 )|m_x,, ahk_id %hw_m_target%
return

WheelDown::
   MouseGetPos, m_x, m_y
   hw_m_target := DllCall( "WindowFromPoint", "int", m_x, "int", m_y )

   ; WM_MOUSEWHEEL
   ;   WHEEL_DELTA = 120
   SendMessage, 0x20A, -120 << 16, ( m_y << 16 )|m_x,, ahk_id %hw_m_target%
return
To make use of my so beloved markup:
~ I compare this solution to digging for oil very deeply to get the powerful oil. (Powerful in terms of "oil can be converted into power" meaning it's just one form of power among many other forms like e.g. money, beautiness, intelligence, physical power, military power, mass, accelerated objects, changing anything changeable in any space...)

Where does it's power come from:
+ DllCall
+ SendMessage
+ << operations (one needs some amount of understanding of Knuth's books here)

The used principle might be formulated like: "Connect simple events like here mouse over with low-level events using e.g. DllCall, SendMessage and bitshift operations."

If anyone wants to find a topic to write a nice tutorial about, the three big plus signs above might be some hints.
Back to top
View user's profile Send private message
Hammillian7



Joined: 08 Jun 2008
Posts: 8
Location: Spain - Madrid

PostPosted: Wed Jun 11, 2008 2:19 am    Post subject: And a Horizontal Scroll version? Reply with quote

I love mouse scrolling and use it a lot (now with Dexxa Mouse driver, which works for me with a Logitech wireless Mouse).

What I want is scrolling the control under the mouse, even if not active.

I tried this sample, derived from the documentation:

Code:

~RAlt & WheelDown::  ; Scroll right.
ControlGetFocus, fcontrol, A
MouseGetPos, , , id, control

Loop 1  ; <-- Increase this value to scroll faster.
{
    SendMessage, 0x114, 1, 0, %fcontrol%, A  ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINELEFT.
    SendMessage, 0x114, 1, 0, %control%, A  ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINELEFT.
}
return


It has 2 parts merged, because some applications are responsive to one kind and others to the other.

But it doesn't work in Excel, Access, etc.

Would it be easy to adapt your vertical examples (which I hadn't had time to try yet) to horizontal scrolling?

Thanks.
_________________
Regards.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group