Change the sensitivity of the mouse cursor with a button Topic is solved
Change the sensitivity of the mouse cursor with a button
Hi, i found a simple solution. I am now looking for a script with which I can change the sensitivity of the mouse with a button. This should work as follows: If I hold down the T key, the mouse cursor should slow down by one step as long as the key is held down. And when I release the T key, the mouse sensitivity returns to the standard normal speed. Hold down the T key = Mouse cursor one step slower. Release the T key, the mouse cursor sensitivity returns to the standard normal speed. With this script it would be easier to hit the opponents in first person shooter games. I think something like this is feasible with Autohotkey
Re: Change the sensitivity of the mouse cursor with a button
I moved your topic from 'Tutorials (v2)' to 'Ask for Help (v2) > Gaming', like I suggested in the other v2 topic - and also linked to.
The 'Tutorials' subforums are not for help requests, but for posting actual tutorials.
Edit: Now I saw that you also posted a duplicate in the AHK v1 Gaming help subforum. If you prefer, and you actually use AHK v1, we can move this topic again.
The 'Tutorials' subforums are not for help requests, but for posting actual tutorials.
Edit: Now I saw that you also posted a duplicate in the AHK v1 Gaming help subforum. If you prefer, and you actually use AHK v1, we can move this topic again.
Last edited by gregster on 07 Mar 2024, 11:27, edited 1 time in total.
Re: Change the sensitivity of the mouse cursor with a button Topic is solved
Code: Select all
; This script gets or sets the mouse speed
; Range is 1-20, 10 is default
; https://autohotkey.com/board/topic/8432-script-for-changing-mouse-pointer-speed/
#Requires AutoHotkey v2.0
t:: {
Static slow := 4 ; Range is 1-20
orig := getMouseSpeed(), setMouseSpeed(slow)
ToolTip '===> SLOW <===', 500, 500
KeyWait(ThisHotkey), setMouseSpeed(orig)
ToolTip
}
getMouseSpeed() {
Static SPI_GETMOUSESPEED := 0x70
DllCall('SystemParametersInfo', 'UInt', SPI_GETMOUSESPEED, 'UInt', 0, 'Ptr*', &speed := 0, 'UInt', 0)
Return speed
}
setMouseSpeed(speed) {
Static SPI_SETMOUSESPEED := 0x71
DllCall('SystemParametersInfo', 'UInt', SPI_SETMOUSESPEED, 'UInt', 0, 'UInt', speed, 'UInt', 0)
}