Double Click Script Help

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
yedbuck
Posts: 5
Joined: 15 Jan 2020, 14:09

Double Click Script Help

15 Jan 2020, 14:36

I have been using this script https jslover.net /AutoHotkey/Scripts/Buggy-Mouse Broken Link for safety for my mouse since it double clicks and I cant replace it for now. However, when I'm using a program, usually Windows programs, it doesn't let me click anything on the background. For example, when I use Device Manager and the script is running, I cant click anything, like Google Chrome, unless I close or minimize the program. The double clicking is getting blocked but I want to know what I can do to fix this other issue from using the script. The programs let me click background stuff when the script isn't running, so it's definitely the script.

Thanks.

Script:
Spoiler
theholyscripture
Posts: 62
Joined: 26 Apr 2019, 17:11

Re: Double Click Script Help

15 Jan 2020, 18:14

yedbuck wrote:
15 Jan 2020, 14:36
I have been using this script https jslover.net /AutoHotkey/Scripts/Buggy-Mouse Broken Link for safety for my mouse since it double clicks and I cant replace it for now. However, when I'm using a program, usually Windows programs, it doesn't let me click anything on the background. For example, when I use Device Manager and the script is running, I cant click anything, like Google Chrome, unless I close or minimize the program. The double clicking is getting blocked but I want to know what I can do to fix this other issue from using the script. The programs let me click background stuff when the script isn't running, so it's definitely the script.

Thanks.

Script:
Spoiler
That's a lot of code to sort through, I'm pretty new at AHK so I wouldn't be able to figure out why that script isn't working. My guess is that it would be better to make a new script. What exactly does your mouse do that you're trying to counteract?
yedbuck
Posts: 5
Joined: 15 Jan 2020, 14:09

Re: Double Click Script Help

15 Jan 2020, 18:31


That's a lot of code to sort through, I'm pretty new at AHK so I wouldn't be able to figure out why that script isn't working. My guess is that it would be better to make a new script. What exactly does your mouse do that you're trying to counteract?
Hi thanks for replying.

I've never made my own script before, at least not one as complex as this, so I wouldn't know how to make a new one. My mouse double clicks and I've been using this script to counteract that, since double clicking is very annoying. However, when I use this script it does more than block the double clicks. It also doesn't let me click off certain programs, as I mentioned in the original post.
theholyscripture
Posts: 62
Joined: 26 Apr 2019, 17:11

Re: Double Click Script Help

16 Jan 2020, 22:58

yedbuck wrote:
15 Jan 2020, 18:31

That's a lot of code to sort through, I'm pretty new at AHK so I wouldn't be able to figure out why that script isn't working. My guess is that it would be better to make a new script. What exactly does your mouse do that you're trying to counteract?
Hi thanks for replying.

I've never made my own script before, at least not one as complex as this, so I wouldn't know how to make a new one. My mouse double clicks and I've been using this script to counteract that, since double clicking is very annoying. However, when I use this script it does more than block the double clicks. It also doesn't let me click off certain programs, as I mentioned in the original post.

So basically whenever you do a left click once, it clicks twice instead? If that's the case, I made a script that could work for you. You may have to play with it a little.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance Force
#Persistent

$LButton::    ; (Left Mouse Button) The $ in front is to prevent the LButton in the script from retriggering the hotkey
KeyWait, LButton ; WAIT FOR BUGGY MOUSE TO RELEASE 1st CLICK OF THE TWO CLICKS IT SENDS
KeyWait, LButton, D TO 0.1 ;0.1 SECONDS  ; IF YOUR BUGGY MOUSE PRESSES AND RELEASES THE SECOND CLICK WITHIN 0.1 SECONDS OF THE FIRST, THEN ONLY ONE CLICK WILL BE SENT, PLAY WITH THIS VALUE IN ORDER TO FIND OUT HOW FAST IT DOUBLE CLICKS AND SHORTEN THE LAG
if ErrorLevel
	Send, {LButton}
Return
yedbuck
Posts: 5
Joined: 15 Jan 2020, 14:09

Re: Double Click Script Help

17 Jan 2020, 12:49

theholyscripture wrote: So basically whenever you do a left click once, it clicks twice instead? If that's the case, I made a script that could work for you. You may have to play with it a little.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance Force
#Persistent

$LButton::    ; (Left Mouse Button) The $ in front is to prevent the LButton in the script from retriggering the hotkey
KeyWait, LButton ; WAIT FOR BUGGY MOUSE TO RELEASE 1st CLICK OF THE TWO CLICKS IT SENDS
KeyWait, LButton, D TO 0.1 ;0.1 SECONDS  ; IF YOUR BUGGY MOUSE PRESSES AND RELEASES THE SECOND CLICK WITHIN 0.1 SECONDS OF THE FIRST, THEN ONLY ONE CLICK WILL BE SENT, PLAY WITH THIS VALUE IN ORDER TO FIND OUT HOW FAST IT DOUBLE CLICKS AND SHORTEN THE LAG
if ErrorLevel
	Send, {LButton}
Return

Yeah the problem with my mouse is that when I left click once, it double clicks. I just used your script but it still had the same problem. I put F12::Suspend at the top of both scripts and tried to click off a program, like Device Manager, but it didn't suspend the hotkey and I still couldn't focus on another program while on it with the script running. The scripts would suspend normally when not in the program though. Do you think this could help you figure out the issue?

Thanks for trying to help me :~)
theholyscripture
Posts: 62
Joined: 26 Apr 2019, 17:11

Re: Double Click Script Help

17 Jan 2020, 22:54

yedbuck wrote:
17 Jan 2020, 12:49
theholyscripture wrote: So basically whenever you do a left click once, it clicks twice instead? If that's the case, I made a script that could work for you. You may have to play with it a little.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance Force
#Persistent

$LButton::    ; (Left Mouse Button) The $ in front is to prevent the LButton in the script from retriggering the hotkey
KeyWait, LButton ; WAIT FOR BUGGY MOUSE TO RELEASE 1st CLICK OF THE TWO CLICKS IT SENDS
KeyWait, LButton, D TO 0.1 ;0.1 SECONDS  ; IF YOUR BUGGY MOUSE PRESSES AND RELEASES THE SECOND CLICK WITHIN 0.1 SECONDS OF THE FIRST, THEN ONLY ONE CLICK WILL BE SENT, PLAY WITH THIS VALUE IN ORDER TO FIND OUT HOW FAST IT DOUBLE CLICKS AND SHORTEN THE LAG
if ErrorLevel
	Send, {LButton}
Return

Yeah the problem with my mouse is that when I left click once, it double clicks. I just used your script but it still had the same problem. I put F12::Suspend at the top of both scripts and tried to click off a program, like Device Manager, but it didn't suspend the hotkey and I still couldn't focus on another program while on it with the script running. The scripts would suspend normally when not in the program though. Do you think this could help you figure out the issue?

Thanks for trying to help me :~)


Sorry, I think my script may have been incomplete. Try this.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance Force
#Persistent

$LButton::    ; (Left Mouse Button) The $ in front is to prevent the LButton in the script from retriggering the hotkey
KeyWait, LButton ; WAIT FOR BUGGY MOUSE TO RELEASE 1st CLICK OF THE TWO CLICKS IT SENDS
KeyWait, LButton, D TO 0.1 ;0.1 SECONDS guess of time it takes for buggy mouse to click twice, if script doesnt work try increasing this value

if ErrorLevel ; if LButton isn't pressed twice by buggy mouse in 0.1 seconds
	Send, {LButton}
else
	Send, {LButton} ; if LButton is pressed twice by buggy mouse in 0.1 seconds
Return
User avatar
telanx
Posts: 68
Joined: 10 Jan 2020, 14:31

Re: Double Click Script Help

18 Jan 2020, 00:05

If you are left button double click, try this tool. Left Mouse Button Fix
yedbuck
Posts: 5
Joined: 15 Jan 2020, 14:09

Re: Double Click Script Help

18 Jan 2020, 15:05

theholyscripture wrote:
Sorry, I think my script may have been incomplete. Try this.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance Force
#Persistent

$LButton::    ; (Left Mouse Button) The $ in front is to prevent the LButton in the script from retriggering the hotkey
KeyWait, LButton ; WAIT FOR BUGGY MOUSE TO RELEASE 1st CLICK OF THE TWO CLICKS IT SENDS
KeyWait, LButton, D TO 0.1 ;0.1 SECONDS guess of time it takes for buggy mouse to click twice, if script doesnt work try increasing this value

if ErrorLevel ; if LButton isn't pressed twice by buggy mouse in 0.1 seconds
	Send, {LButton}
else
	Send, {LButton} ; if LButton is pressed twice by buggy mouse in 0.1 seconds
Return
I just tried it but still had the same problem. Also, with this script I cant drag the mouse either (for example, if I was trying to draw or select some text it wouldn't do so).

Thanks
yedbuck
Posts: 5
Joined: 15 Jan 2020, 14:09

Re: Double Click Script Help

18 Jan 2020, 15:11

telanx wrote:
18 Jan 2020, 00:05
If you are left button double click, try this tool. Left Broken Link for safety Mouse Button Fix
Thanks, that's working for now and fixes the program focus issue!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], peter_ahk, TAC109 and 352 guests