Jump to content

Switch mouse sensitivity and acceleration?


Recommended Posts

Hi,

i want to write a lil script, that changes my mouse sensitivity and acceleration.

My problem: I'm often on the way, so, sometimes i've a desktop-mouse, and sometimes i must use the touchpad of my notebook.

My Mouse works fine, but, if i try to use the touchpad, the mouse sensitivity is to low, so i must manually change it to a higher level and activate the mouse acceleration.

Has anybody any idea, where i can set up the mouse settings? maybe in the registry?

Attention! English noob ^^

Link to comment
Share on other sites

I love u :D

Tried to took a backup of the registry before i change the sensitivity to a higher level, and after that. I want to compare both with textpad, but, that did not worked.

Thanks a lot.

Btw.: On christmas, i will drive to burgerking, get some burgers, drive home, and watch stupid action films, like predator 1 ... i hate christmas.. :P

Attention! English noob ^^

Link to comment
Share on other sites

  • 1 year later...

Hate to revive an old thread but I tried changing the values in the registry and they had no effect at all. When I change the value with the windows control panel it works perfectly and I can't find any other value(s) that might have changed.

Link to comment
Share on other sites

You just cant write some values and expect the rest of your computer to react to them, you have to restart your computer or force it to "update" somehow (I forgot how :D)

Also are you sure you are editing the right values?? Did you try changing them from the control panel while running Procmon/Regmon??

Edited by AdmiralAlkex
Link to comment
Share on other sites

I watched the values through the standard regedit and made sure the values I was editing were the ones that changed. If someone here could tell us how to make the computer update the values without a restart that would be great. I'm using this because I'm trying to write a basic game in Autoit so a full computer restart wouldn't be that practical for my case.

Link to comment
Share on other sites

I watched the values through the standard regedit and made sure the values I was editing were the ones that changed. If someone here could tell us how to make the computer update the values without a restart that would be great. I'm using this because I'm trying to write a basic game in Autoit so a full computer restart wouldn't be that practical for my case.

Its not possible through the registry.
Link to comment
Share on other sites

Trying to work it here, I must be doing something wrong but I don't understand this all very well.

Global Const $SPI_SETMOUSE = 4
$tMouse = DllStructCreate('int[3]')
DllStructSetData($tMouse, 1, 14, 1) ; Sensitivity ?
DllStructSetData($tMouse, 1, 6, 2)  ; Threshold 1 ?
DllStructSetData($tMouse, 1, 10, 3) ; Threshold 2 ?

DllCall('user32.dll', 'int', 'SystemParametersInfo', 'uint', $SPI_SETMOUSE, 'uint', 0, 'ptr', DllStructGetPtr($tMouse), 'uint', 0)

Going on documentation here: http://msdn2.microsoft.com/en-us/library/m...947(VS.85).aspx

On SPI_SETMOUSE it says:

Sets the two mouse threshold values and the mouse acceleration. The pvParam parameter must point to an array of three integers that specifies these values. See mouse_event for further information.

I don't think I'm doing the array of integers part right.
Link to comment
Share on other sites

I did some digging myself and came up with this:

rundll32 shell32,SHExitWindowsEx -1

I don't really know how to use it in DllCall though since I'm not familiar with that yet. If someone wants to translate it to Autoit before me by all means. It's supposed to restart explorer.exe or windows without exiting the windows GUI. I don't know if it works or not but there it is.

Edit: Ignore this I just tried it. The post had no date so I didn't know anything about it. The function is missing from the dll (or so it says) and therefore this method is meaningless.

Edited by dbzfanatic
Link to comment
Share on other sites

  • 1 month later...

there you go, thanks to AHK forum here is how you can change mouse speed:

Const $SPI_SETMOUSESPEED = 0x0071

$MySpeed = 11; A number between 1-20.

DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_SETMOUSESPEED, "int", 0, "int", $MySpeed, "int", 0)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...