1. [ Script Fix ] for mouse acceleration.

    Couldn't find a working fix so I made one ...
    This runs Wow then turns off mouse acceleration. After closing Wow will restore mouse acceleration.
    You could change the script to suit your needs. This is an Autoit script and can be compiled to an executable
    (once you installed Autoit). Autoit is a free scripting language and very useful for stuff like this. Once compiled
    or ran in script form this file needs to be Wow main folder (the same folder as the Wow.exe file).

    Notes:
    This will stay in the background waiting for Wow to exit then turn back on the mouse acceleration. It will have a slight stall when turning back on mouse acceleration. The loop is 99.99% "sleeping" and will not effect Wow game play at all. If the Wow process is not found within 10 seconds of running - the program will show an error and exit. Wait a full 6 seconds before running the program again anytime you exit Wow. The program was tested on Windows 10. It is a .au3 program (Autoit) used for program logic. However the function directly calls the system's .dlls "Assembler style" - it should be compatible with all Windows versions due to that.

    MouseAccelStart.au3
    - - - - - - - - - - - - - - - - - - - -
    Local $Count = 0
    Run ("Wow.exe","") ; run Wow
    While (Not ProcessExists("Wow.exe")) and ($Count < 11) ; wait till process exists
    Sleep(1000) ; one second stall
    $Count += 1
    WEnd
    If($Count > 10) Then ; error check
    MsgBox(0, "Error", "An error occurred: " & "Wow is not running", 0)
    Exit
    EndIf
    _EnableMouseAccel(false) ; turn off accelerated mouse
    If @error Then MsgBox(0, "Error", "An error occurred: " & @error, 0)
    While ProcessExists("Wow.exe") ; wait till process exits
    Sleep(5000) ; five second stall
    WEnd
    _EnableMouseAccel(true) ; turn on accelerated mouse
    If @error Then MsgBox(0, "Error", "An error occurred: " & @error, 0)
    Exit

    Func _EnableMouseAccel($ivState)
    Local Const $SPI_SETMOUSE = 4
    Local Const $SPIF_UPDATEINIFILE = 1
    Local Const $SPIF_SENDWININICHANGE = 2
    Local $mouseStruct = DllStructCreate("int[3]")
    DllStructSetData($mouseStruct, 1, 6*$ivState, 1)
    DllStructSetData($mouseStruct, 1, 10*$ivState, 2)
    DllStructSetData($mouseStruct, 1, $ivState, 3)
    Local $avResult = DllCall("user32.dll", "int", "SystemParametersInfo", "uint", $SPI_SETMOUSE, "uint", 0, "ptr", _
    DllStructGetPtr($mouseStruct), "uint", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDWININICHANGE))
    If @error Or Not $avResult[0] Then Return(SetError(1, 0, 0)) ; Failed
    EndFunc
    - - - - - - - - - - - - - - - - - - - -


    Or two direct mouse acceleration switch programs ...
    One to turn off mouse acceleration and one to turn on mouse acceleration.
    [ Just move the ; in front of the line you're not using and create two scripts or programs ]

    MouseAccelOff.au3 and MouseAccelOn.au3
    - - - - - - - - - - - - - - - - - - - -
    _EnableMouseAccel(false) ; turn off accelerated mouse
    ; _EnableMouseAccel(true) ; turn on accelerated mouse

    If @error Then MsgBox(0, "Error", "An error occurred: " & @error, 0)
    Exit

    Func _EnableMouseAccel($ivState)
    Local Const $SPI_SETMOUSE = 4
    Local Const $SPIF_UPDATEINIFILE = 1
    Local Const $SPIF_SENDWININICHANGE = 2
    Local $mouseStruct = DllStructCreate("int[3]")
    DllStructSetData($mouseStruct, 1, 6*$ivState, 1)
    DllStructSetData($mouseStruct, 1, 10*$ivState, 2)
    DllStructSetData($mouseStruct, 1, $ivState, 3)
    Local $avResult = DllCall("user32.dll", "int", "SystemParametersInfo", "uint", $SPI_SETMOUSE, "uint", 0, "ptr", _
    DllStructGetPtr($mouseStruct), "uint", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDWININICHANGE))
    If @error Or Not $avResult[0] Then Return(SetError(1, 0, 0)) ; Failed
    EndFunc
    - - - - - - - - - - - - - - - - - - - -
    Edited: July 12, 2020

  2. I see your point! Then, I also appreciate your sharing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •