Making Single click into Double click

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
XDarkPhoenixX
Posts: 4
Joined: 25 Apr 2017, 23:22

Making Single click into Double click

25 Apr 2017, 23:35

So for annoying reasons I need to make my left click Double click each time I press it once.

First I did the easy one: LButton::Click 2
Works.

But you can't click and hold, drag, highlight text etc..

Eventually found my way to this:
`::suspend
LButton up::Click 2
LButton::Click Down

Also works, Every single click is a double. And I can now click and drag, Highlight text. But when I let go of LButton, it Double clicks. So highlighted text is not highlighted anymore etc..

Not sure where to go from here. Before I got to where I was I tried loops and GetKeyState, var etc... So if the answer lies there I won't see it, I'm really burnt out over those.

So If anyone has a script that can make Single Lbutton click into Double Lbutton click while still retaining all other features of LButton (Drag, highlight etc..) (Well except single click..) that would be amazing.

Thanks :)

Anyway... I'm really tired. Going to sleep.

P.S I can't rebind to keyboard keys. All has to be done with LButton :(
Rohwedder
Posts: 7627
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Making Single click into Double click

26 Apr 2017, 06:52

Hallo,
try:

Code: Select all

~LButton::
	Time := A_TickCount
	KeyWait, LButton
	If ((A_TickCount-Time) < 200)
		Click
Return
XDarkPhoenixX
Posts: 4
Joined: 25 Apr 2017, 23:22

Re: Making Single click into Double click

26 Apr 2017, 12:15

Rohwedder wrote:Hallo,
try:

Code: Select all

~LButton::
	Time := A_TickCount
	KeyWait, LButton
	If ((A_TickCount-Time) < 200)
		Click
Return
Didnt work :(

This seemed to do the same as:

LButton up::Click 2
LButton::Click Down

I was able to Double click with each press and I was able to click and hold to highlight, but it is deselected when releasing LButton.

Im trying to work out how to do a ahk script that does:

On LButton Press, Click 2 and if held, Click down. On LButton release, stop all.
XDarkPhoenixX
Posts: 4
Joined: 25 Apr 2017, 23:22

Re: Making Single click into Double click

26 Apr 2017, 13:02

Well for now I might leave it as:

'::suspend
LButton up::Click
LButton::Click Down

I seem to be able to get by with that. And when I need to single click or highlight text I can suspend.

Still not great, but kinda over the experimenting, especially since for some of it I left a bunch of scripts running that interferred with each other. So no idea if any of those experiments could have worked :(
Rohwedder
Posts: 7627
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Making Single click into Double click

26 Apr 2017, 15:55

Hallo,
If it deselect when releasing LButton, then for you the 200 ms are too long.
Try my version with 100 or 50.
XDarkPhoenixX
Posts: 4
Joined: 25 Apr 2017, 23:22

Re: Making Single click into Double click

27 Apr 2017, 11:28

Rohwedder wrote:Hallo,
If it deselect when releasing LButton, then for you the 200 ms are too long.
Try my version with 100 or 50.
Oh I see.

Well after looking at it some more, your script works pretty much how I wanted it. But only if I use a mouse.

I didn't mention was was messing around with touchscreens. I didn't think it mattered.

But for some reason, when using your script, it doesn't register me holding the pen on the screen.

I'll try to modify your script to include a Click Down function somewhere in there.

Thanks for all the help :)
sanbi102
Posts: 1
Joined: 22 Feb 2022, 06:00

Re: Making Single click into Double click

22 Feb 2022, 06:02

Rohwedder wrote:
26 Apr 2017, 06:52
Hallo,
try:

Code: Select all

~LButton::
	Time := A_TickCount
	KeyWait, LButton
	If ((A_TickCount-Time) < 200)
		Click
Return
Brilliant, works like magic for me ^^ I put 150 tho

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 400 guests