Thanks in advance.
My mouse is "broken". Its left-click switch lets go occasionally. Whenever it does, it only does it for an incredibly short amount of time, but it still interferes with drag-and-drop things. I know that it is possible to fix this problem with a script, but I don't know how.
Script to Save my Mouse Topic is solved
Re: Script to Save my Mouse
i doubt it can be done
get a new mouse or replace the switch
get a new mouse or replace the switch
Re: Script to Save my Mouse Topic is solved
personfaceman wrote:Thanks in advance.
My mouse is "broken". Its left-click switch lets go occasionally. Whenever it does, it only does it for an incredibly short amount of time, but it still interferes with drag-and-drop things. I know that it is possible to fix this problem with a script, but I don't know how.
Did you try physically cleaning the mouse?
Meantime i'll pray for your mouse
Re: Script to Save my Mouse
Yeah, this is probably fixable
However, it will mean delaying all button events for the left mouse button by the amount of time that it glitches out for.
Basically you block all clicks, and wait to see if it re-presses it again within a certain amount of time.
Edit the value of SuppressTime in the script, make it as low as you can whilst still remaining reliable.
If you can get it under 100ms or so, it will probably be pretty much un-noticeable.
However, it will mean delaying all button events for the left mouse button by the amount of time that it glitches out for.
Basically you block all clicks, and wait to see if it re-presses it again within a certain amount of time.
Edit the value of SuppressTime in the script, make it as low as you can whilst still remaining reliable.
If you can get it under 100ms or so, it will probably be pretty much un-noticeable.
Code: Select all
#SingleInstance, force
; Change this to alter the max allowed time between a release and re-press
; Try to get it as low as possible
SuppressTime := 100
TimerRunning := 0 ; Is the timer currently running?
; Block LMB press and run this code instead
$*LButton::
if (TimerRunning){
; An up event happened within SuppressTime, and a down event just happened
; Cancel the timer
SetTimerState(0)
; Exit so the click just gets blocked
return
}
; Appears to be a normal press, pass it through
Send {Blind}{LButton down}
return
; Block LMB release and run this code instead
$*LButton Up::
; Button was released, this may be due to the fault.
; The up event has already been blocked, so start a timer running instead
SetTimerState(1)
return
; The timer fired before the button was re-held
; Looks like a normal release of the button happened, so send the event now
SendRelease:
TimerRunning := 0
Send {Blind}{LButton up}
return
; Used to turn on and off the timer
SetTimerState(state){
global TimerRunning, SuppressTime
TimerRunning := state
SetTimer, SendRelease, % (state ? "-" SuppressTime : "Off")
}
Who is online
Users browsing this forum: No registered users and 353 guests