Hi,
Can someone help me with a script?
Idea:
If you scrollwheel down you get multiple clicks, is it possible when you scroll down you only get 2 clicks and after the 2 clicks a small delay of 500ms, so you cant get more than 2 clicks if you fast scroll down?
Many thanks for your help!
Scrollwheel script
Re: Scrollwheel script
This should do what you want, but is not quite what you described.
It will filter when two rolls *within 500ms of each other* are detected - not within 500ms of the first roll (Which would be a fair bit more tricky).
It will filter when two rolls *within 500ms of each other* are detected - not within 500ms of the first roll (Which would be a fair bit more tricky).
Code: Select all
#SingleInstance force
ClickCount := 0 ; How many rolls were seen in the last
NextWindow := A_TickCount ; If two rolls seen within 500ms of each other, the time at which rolls are allowed again
LastRoll := 0
~WheelDown::
if (A_TickCount < NextWindow){
; Roll within 500ms of last roll - increment counter
ClickCount++
} else {
; Roll not within 500ms of last roll - reset counter
ClickCount := 0
}
if (ClickCount < 2){ ; As long as two rolls not seen within 500ms...
Send {LButton} ; ... Send Left Mouse ...
NextWindow := A_TickCount + 500 ; ... And set NextWindow to 500ms in future
}
return
^Esc::
ExitApp
Re: Scrollwheel script
Thanks!
This is not working exact as i needed.
If you scroll fast down you feel multiple tics in your scrollwheel, i would like to have that it only registers 2tics, regardless how many tics u give in 1 motion.
(In fortnite you can edit and reset edit with 1 button (scrollwheel), so there are both bind to scrollwheel down and you have to scroll 2 times, i want if u scroll inequally 3 or more times in less then 500ms that it only registers 2 times)
Sorry it is very hard to explain if you dont play fortnite!
This is not working exact as i needed.
If you scroll fast down you feel multiple tics in your scrollwheel, i would like to have that it only registers 2tics, regardless how many tics u give in 1 motion.
(In fortnite you can edit and reset edit with 1 button (scrollwheel), so there are both bind to scrollwheel down and you have to scroll 2 times, i want if u scroll inequally 3 or more times in less then 500ms that it only registers 2 times)
Sorry it is very hard to explain if you dont play fortnite!
Re: Scrollwheel script
Ah, I misunderstood you, I took "If you scrollwheel down you get multiple clicks" to mean Left Mouse button "Clicks".
So my script was written to send LButton when you rolled the wheel (But only twice).
It now seems that you do not want to send any different character, you just want to block the mouse wheel after two consectutive fast rolls?
If the game was seeing the mouse wheel while you had my last script running, then we have a problem. The WheelDown:: hotkey SHOULD block the game from seeing WheelDown, so it sounds like the AHK script is having zero effect.
Maybe you need to run the script as admin?
To make the script send WheelDown instead of LButton, simply change Send {LButton} to Send {WheelDown}
So my script was written to send LButton when you rolled the wheel (But only twice).
It now seems that you do not want to send any different character, you just want to block the mouse wheel after two consectutive fast rolls?
If the game was seeing the mouse wheel while you had my last script running, then we have a problem. The WheelDown:: hotkey SHOULD block the game from seeing WheelDown, so it sounds like the AHK script is having zero effect.
Maybe you need to run the script as admin?
To make the script send WheelDown instead of LButton, simply change Send {LButton} to Send {WheelDown}
Re: Scrollwheel script
Sorry my english and explaination are not that good.
If you scrolldown with scrollwheel u cant control exact of amounts of scrolls, i want to get always 2 scrolls, not more.
u understand?
If you scrolldown with scrollwheel u cant control exact of amounts of scrolls, i want to get always 2 scrolls, not more.
u understand?
Re: Scrollwheel script
Code: Select all
#SingleInstance force
ClickCount := 0 ; How many rolls were seen in the last
NextWindow := A_TickCount ; If two rolls seen within 500ms of each other, the time at which rolls are allowed again
LastRoll := 0
$WheelDown::
if (A_TickCount < NextWindow){
; Roll within 500ms of last roll - increment counter
ClickCount++
} else {
; Roll not within 500ms of last roll - reset counter
ClickCount := 0
}
if (ClickCount < 2){ ; As long as two rolls not seen within 500ms...
Send {WheelDown} ; ... Send WheelDown ...
NextWindow := A_TickCount + 500 ; ... And set NextWindow to 500ms in future
}
return
^Esc::
ExitApp
Who is online
Users browsing this forum: BernardDwess, Google [Bot] and 85 guests