searching around, I found a nice program called WizMouse, which would make any window under the mouse scroll with the mouse wheel, even if unfocused. Loved this functionality. But with a bit more searching, I found this great AHK code which does exactly the same thing, in an even better way, and without another extra software installed. Great! So here I share it with anyone else who might be interested in this.
This was the only version I found which doesn't interfere with Volume Mouse Wheel option in FastKeys
Type: Command
Code: Select all
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