Press & Hold ControlClick Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
AndyRal123
Posts: 21
Joined: 10 Oct 2020, 12:32

Press & Hold ControlClick

Post by AndyRal123 » 29 Oct 2020, 06:20

Hello everyone :)

I would appreciate help with this:


w::ControlClick, x10354 y568



I want to hold that place with control click as long as I hold ''w" button on keyboard.
I know there is D command, but can't find a way to implement that.


Hope that somebody can help me. :headwall:
Thank You :)
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Press & Hold ControlClick  Topic is solved

Post by mikeyww » 29 Oct 2020, 06:49

Code: Select all

w::
SoundBeep, 1500, 20
ControlClick, x10354 y568,,,,, D ; Hold the mouse button
KeyWait, %A_ThisHotkey% ; Wait for the key to be released
SoundBeep, 1000, 20
ControlClick,,,,,, U ; Release the mouse button
Return
Some programs might not respond to this.
AndyRal123
Posts: 21
Joined: 10 Oct 2020, 12:32

Re: Press & Hold ControlClick

Post by AndyRal123 » 16 Nov 2020, 03:04

mikeyww wrote:
29 Oct 2020, 06:49

Code: Select all

w::
SoundBeep, 1500, 20
ControlClick, x10354 y568,,,,, D ; Hold the mouse button
KeyWait, %A_ThisHotkey% ; Wait for the key to be released
SoundBeep, 1000, 20
ControlClick,,,,,, U ; Release the mouse button
Return
Some programs might not respond to this.


I strongly appreciate Your response and it works very well. That's the second time You helped me and I am grateful for that :)
All good for You :)
Post Reply

Return to “Ask for Help (v1)”