Hello,
Im pretty new in AHK and i just need a "Simple" Script that slow down the Mouse when i move it to fast !.
And jeah, thats all ^^ Thanks.
Slow down mouse by Flick
-
- Posts: 69
- Joined: 28 Dec 2017, 02:53
Re: Slow down mouse by Flick
you can do that in you pc settings, change the dpi
Re: Slow down mouse by Flick
while(1){
MouseGetPos,xMouse1,yMouse2
sleep,5
MouseGetPos,xMouse2,yMouse2
if(abs(xMouse2-xMouse1) > 10)
mousemove,xMouse1,yMouse2 ; ot into the middle or so
}
MouseGetPos,xMouse1,yMouse2
sleep,5
MouseGetPos,xMouse2,yMouse2
if(abs(xMouse2-xMouse1) > 10)
mousemove,xMouse1,yMouse2 ; ot into the middle or so
}
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Slow down mouse by Flick
First of all, thanks! but how can i change "how fast i need to move" to get slower ?. I tryed to change the 10 but its didnt work :/.SL5 wrote:while(1){
MouseGetPos,xMouse1,yMouse2
sleep,5
MouseGetPos,xMouse2,yMouse2
if(abs(xMouse2-xMouse1) > 10)
mousemove,xMouse1,yMouse2 ; ot into the middle or so
}
Edit: I found this Script here,
Code: Select all
; Example: This is a hotkey that temporarily reduces the mouse cursor's speed, which facilitates precise positioning.
; Hold down the F1 key to slow down the cursor. Release it to return to original speed.
F1::
SPI_GETMOUSESPEED = 0x70
SPI_SETMOUSESPEED = 0x71
; Retrieve the current speed so that it can be restored later:
DllCall("SystemParametersInfo", UInt, SPI_GETMOUSESPEED, UInt, 0, UIntP, OrigMouseSpeed, UInt, 0)
; Now set the mouse to the slower speed specified in the next-to-last parameter (the range is 1-20, 10 is default):
DllCall("SystemParametersInfo", UInt, SPI_SETMOUSESPEED, UInt, 0, Ptr, 3, UInt, 0)
KeyWait F1 ; This prevents keyboard auto-repeat from doing the DllCall repeatedly.
return
F1 up::DllCall("SystemParametersInfo", UInt, 0x71, UInt, 0, Ptr, OrigMouseSpeed, UInt, 0) ; Restore the original speed.
- If the mouse speed is to fast (25) than its Activate the Script and if the mouse is not faster than 25 its have the original speed.
Re: Slow down mouse by Flick
My plan was to measure distance. the shorter the interval the more even. you can then invent to you a rule, what should happen if the move was too much for this time. whether he has half the plug back or only 75% back or so.
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Slow down mouse by Flick
I fixed it, thanks.SL5 wrote:My plan was to measure distance. the shorter the interval the more even. you can then invent to you a rule, what should happen if the move was too much for this time. whether he has half the plug back or only 75% back or so.
Re: Slow down mouse by Flick
I understand your Plan but how its move, it so ... (Nothing for me) and than i found this Script here about MouseSpeed and i found it awesome and because this i want it so, so i tryed out my self but didnt got it why its wont work. Its look so now,SL5 wrote:My plan was to measure distance. the shorter the interval the more even. you can then invent to you a rule, what should happen if the move was too much for this time. whether he has half the plug back or only 75% back or so.
Code: Select all
MouseGetPos,xMouse1,yMouse2
if(abs(xMouse1-xMouse1) > 50) {
SPI_GETMOUSESPEED = 0x70
SPI_SETMOUSESPEED = 0x71
DllCall("SystemParametersInfo", UInt, SPI_GETMOUSESPEED, UInt, 0, UIntP, OrigMouseSpeed, UInt, 0) ; Its save the Normal Mouse speed
DllCall("SystemParametersInfo", UInt, SPI_SETMOUSESPEED, UInt, 0, Ptr, 3, UInt, 0) ; Now its make it slower
} else {
DllCall("SystemParametersInfo", UInt, 0x71, UInt, 0, Ptr, OrigMouseSpeed, UInt, 0) ; Restore the original speed.
}
Re: Slow down mouse by Flick
I have not tested your script and suspect that it does something else anyway. maybe it's about the mouse speed when the computer controls it. that's nothing special. but to prevent the user from moving quickly, I can only remember the last idea. sorry. may it takes days of hard work for you to find a good mixure.asdasd wrote: Maybe you know what is the Problem because you know good AHK thanks
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Slow down mouse by Flick
Code: Select all
#SingleInstance,force
; prototype1
while(1){
MouseGetPos,x1,y2
sleep,15
MouseGetPos,x2,y2
if(abs(x2-x1) > 2 || abs(y2-y1) > 2){
ToolTip,youre moveing to fast
;mousemove,xMouse1,yMouse2 ; ot into the middle or so
}else
ToolTip,
}
Code: Select all
#SingleInstance,force
;ExitApp
CoordMode, Mouse, Screen
SetBatchLines, -1
; prototype2
while(1){
MouseGetPos,x1,y1
Sleep,1
MouseGetPos,x2,y2
if(abs(x2-x1) > 2 || abs(y2-y1) > 2){
ToolTip,youre moveing to fast
;mousemove,% (x1+x2)/2,% (y1+y2)/2 ; a little slower
;mousemove,% x1,% y1 ,0
; DllCall("SetCursorPos", int, (x1+x2)/2, int, (y1+y2)/2)
DllCall("SetCursorPos", int, x1, int, y1)
}else
ToolTip,
}
github>g_IntelliSense + next improvements + forum
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
ahk..org>onlineAHKprettyfy, ahk..com>Refactoring
ahk..com>newposts Unanswrd myposts, Donations are appreciated if I could help you
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: scriptor2016 and 372 guests