Autoit MouseWheel in an Inactive Window

11/09/2020 09:14 saml_e#1
Any tip on how to trigger a MouseWheel event in an inactive window?
Something similar to how ControlClick works.
11/11/2020 16:21 saml_e#2
just found the UDF... posting here in case someone else is looking for the same info...

Code:
Func _MouseWheelPlus($Window, $direction, $clicks)
    Local $WM_MOUSEWHEEL    =  0x020A
    $MouseCoord = MouseGetPos()
        $X = $MouseCoord[0]
        $Y = $MouseCoord[1]
    If $direction = "up" then
        $WheelDelta = 120
    Else
        $WheelDelta = -120
    Endif
    For $i = 0 to $clicks
    DllCall("user32.dll", "int", "SendMessage", _
            "hwnd",  WinGetHandle( $Window ), _
            "int",   $WM_MOUSEWHEEL, _
            "long",   _MakeLong(0,$WheelDelta), _
            "long",  _MakeLong($X, $Y))
    Next
EndFunc

Func _MakeLong($LoWord,$HiWord)
  Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
EndFunc
Source: [Only registered and activated users can see links. Click Here To Register...]