Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Stop Double-Click if too fast


  • Please log in to reply
20 replies to this topic
Platypus Man
  • Guests
  • Last active:
  • Joined: --
So, my problem is that my mouse is defective. I've exchanged it several times, but the same problem remains: sometimes, when I click the left mouse button one time, it registers as multiple clicks. I know I would be better off getting a new mouse, but I was thinking that an AHK script might be able to help me out and save me some money. So far, this is what I have:
LButton::
	If (A_PriorHotkey != A_ThisHotkey OR A_TimeSincePriorHotkey > 500) ;if first click
	{
		Send {LButton}
		Return
	}
	If (A_PriorHotkey != A_ThisHotkey OR A_TimeSincePriorHotkey < 100) ;if hyperclick
		Return
	Send {LButton}
Return

Well, the problem is, it doesn't work. In the second If statement, I have 100 as the time, but that's only for testing -- I'd probably set it lower once it works. The idea is that if it's the second click and it's under a certain time, I only want it to register as a single click, but between that and another time, it should still register as a double-click, and it should register as a single-click above that. I can't get that combination of functionality to work.

This also kills the ability to click-and-drag, and I'm not sure why, but it would be great if that could be fixed as well.

Any help would be much appreciated!

HotKeyIt
  • Moderators
  • 7109 posts
  • Last active: Today, 12:47 PM
  • Joined: 18 Jun 2008
Try:
LButton::	
	If (A_TimeSincePriorHotkey < 150) ;hyperclick
		Return
	Click Down
	KeyWait, LButton
	Click Up
Return


Platypus Man
  • Guests
  • Last active:
  • Joined: --

Try:

LButton::	
	If (A_TimeSincePriorHotkey < 150) ;hyperclick
		Return
	Click Down
	KeyWait, LButton
	Click Up
Return


That seems to work perfectly, along with keeping the click-and-drag. I lowered the hyperclick threshold from 150 to 10 to actually use it, but that might need to be tweaked, depending on how fast my mouse does it.

Thank you so much! I really didn't want to buy a new mouse, as I like the design of this one, so you've helped me a lot! Thanks again!

HotKeyIt
  • Moderators
  • 7109 posts
  • Last active: Today, 12:47 PM
  • Joined: 18 Jun 2008
You are welcome.

It is funny that AHK can even fix a broken mouse :D

enduro
  • Guests
  • Last active:
  • Joined: --
Thanx, guys! I have 2 "double-click-instead-one" mouses. I've been looking for solution so long.

Rangnarok
  • Guests
  • Last active:
  • Joined: --
Stumpled upon this when my beloved Razor Diamondback has this problem. Thanks so much as it fixes my mouse straight away!!!

Barok
  • Guests
  • Last active:
  • Joined: --
Thank you very much for this, this script "repair" my mouse ^^

Barney
  • Guests
  • Last active:
  • Joined: --
Thanks. this script repaired my mouse too !

  • Guests
  • Last active:
  • Joined: --
This is an old topic, that was just bumped, but since it's directly related, I figured I'd link to my script again...
Buggy-Mouse.ahk...as mentioned in these topics...
Re: Detect Accidental Double Clicks
Re: debounce mouse keys
Re: Catching mouse clicks, processing, firing mouse clicks

GeorgettaCZ
  • Guests
  • Last active:
  • Joined: --
Hell-low fellas!

Great job there! Got my G7 for couple years now...suddenly single click happened to be an unwanted double-click...DAMN!

The AHK does the job 100 per cent. Now all working fine again.

Cheers! :lol: :wink:

  • Guests
  • Last active:
  • Joined: --
This just saved my Imperator for a refund! Works like a charm, though i adjusted the timing to be a little quicker.. ;) Snappy fingers :oops:

rmdaustin
  • Members
  • 6 posts
  • Last active: Aug 27 2011 12:56 PM
  • Joined: 24 Aug 2011
I've been using this script on two machines (via KVM switch) for a couple of weeks to squeeze the last life out of my double-click-prone WowPen Eco.

It works great for suppressing the double click behavior, but once in a while (once per day or so) it will cause a particular window to stop accepting mouse clicks at all, almost as if it gets stuck in suppress mode for one window. What's even stranger is that window also seems to be locked for keyboard input (Alt-F4 doesn't work, for example). But I still see the hover effects when I mouse over. Other windows and the Windows interface still work fine. This most often happens with Visual Studio, but I've also seen it with Notepad (happened with the AutoHotkey editor just now) and other windows. Clickability usually comes back if I "show desktop" (minimize everything) and then click "show desktop" again (restore everything). This happens on both my Vista and Windows 7 machines.

I'm using the 2011-07-12 version of the script. Any ideas?

rmdaustin
  • Members
  • 6 posts
  • Last active: Aug 27 2011 12:56 PM
  • Joined: 24 Aug 2011
Just had the problem again where Buggy-Mouse.ahk blocks all mouse clicks. This time it was for all windows and the taskbar. Couldn't get mouse to work again until I hit Ctrl-Alt-Delete and Escape. I'm including the text from the debug window of AutoHotkey in case it helps...

ipt lines most recently executed (oldest first).  Press [F5] to refresh.  The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0).  The bottommost line's elapsed time is the number of seconds since it executed.

087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp} (0.01)
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%}
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp} (0.02)
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%} (0.02)
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp}
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%} (0.01)
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return (1.75)
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp} (0.02)
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return (0.66)
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%}
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return (0.38)
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp}
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return (0.59)
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%} (0.02)
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return (2.86)
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp} (0.02)
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return (0.09)
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%} (0.02)
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return (0.84)
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp}
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return (0.08)
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%}
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return (1.03)
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp} (0.01)
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return (0.08)
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%}
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return (1.05)
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp} (0.01)
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return (0.64)
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%} (0.01)
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return (1.65)
087: Critical
088: di += 1
089: TimeSinceLastMouseDown := A_TickCount-LastMouseDown_ts
091: DoubleClickTooFast := TimeSinceLastMouseDown<=DoubleClickMin_ms
092: ClickAfterMouseUpTooSoon := (ClickAfterMouseUpMin_ms!="" && TimeSinceLastMouseUp<=ClickAfterMouseUpMin_ms)
093: if (A_ThisHotkey==LastMouseDown && (DoubleClickTooFast || ClickAfterMouseUpTooSoon))  
103: Send,{%A_ThisHotkey% DownTemp} (0.02)
104: msg = 
Sent, {%A_ThisHotkey% DownTemp}

if (%A_ThisHotkey%==%LastMouseDown% && (%DoubleClickTooFast% || %ClickAfterMouseUpTooSoon%))
108: }
109: BuggyMouse_DebugMsg_down = %di%: %A_ThisHotkey%(%TimeSinceLastMouseDown%)%LastMouseDown%%msg%
110: msg = 
111: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
112: LastMouseDown := A_ThisHotkey
113: LastMouseDown_ts := A_TickCount
114: Return (0.09)
119: Critical
120: ui += 1
121: TimeSinceLastMouseUp := A_TickCount-LastMouseUp_ts
124: if (blockeddown)  
132: Send,{%A_ThisHotkey%}
133: msg = 
Sent, {%A_ThisHotkey%}
134: }
136: BuggyMouse_DebugMsg_up = %ui%: %A_ThisHotkey%(%TimeSinceLastMouseUp%)%LastMouseUp%%msg%
137: msg = 
138: Gosub,BuggyMouse_Debug
149: CoordMode,Tooltip
150: if (A_ThisLabel="BuggyMouse_Debug_ShowLastMsg" || (BuggyMouse_Debug && (!BuggyMouse_Debug_OnlyBlocked || (BuggyMouse_Debug_OnlyBlocked && (blockeddown||blockedup)))))  
155: ToolTip
156: }
157: Return
140: blockeddown = 
141: blockedup = 
142: LastMouseUp := A_ThisHotkey
143: LastMouseUp_ts := A_TickCount
144: Return (11.36)

Press [F5] to refresh.


  • Guests
  • Last active:
  • Joined: --

I'm using the 2011-07-12 version of the script. Any ideas?

...I guess you mean this version?...
Wed, Jul 20, 2011 --- 7/20/11, 2:10:47pm EDT

Just had the problem again where Buggy-Mouse.ahk blocks all mouse clicks.

...yes, I was in the middle of creating a new feature (ClickAfterMouseUpMin) & never got back to it. I need to at least disable that new feature, until it works. Before that feature, I never experienced clicks constantly blocking in a window, but with that (unfinished) feature, I have seen it "lock up" in Firefox, where no clicks are accepted.

I will try to remove/comment out that unfinished feature, so the rest of the script can work.

rmdaustin
  • Members
  • 6 posts
  • Last active: Aug 27 2011 12:56 PM
  • Joined: 24 Aug 2011
Yeah, sorry, I meant the 7/20 version.

I saw you posted an update for 8/25. I've been running that for the last couple of hours and so far, so good.

Thank you!