I wrote a simple MouseClickDrag one, but how would I hold the click? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mmflume
Posts: 15
Joined: 29 Nov 2023, 23:27

I wrote a simple MouseClickDrag one, but how would I hold the click?

Post by mmflume » 29 Mar 2024, 21:22

Could you please teach me how I could do this?
I would like it to hold theh left click until I let go my left click button.

Code: Select all


!RButton:: ;When Alt+Right Click (holding)
CoordMode, Mouse, Screen
MouseGetPos, StartX, StartY
MouseClickDrag, Left, 0, 0, -1, 790, 0, R
MouseMove, StartX, StartY


Rohwedder
Posts: 7656
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: I wrote a simple MouseClickDrag one, but how would I hold the click?  Topic is solved

Post by Rohwedder » 30 Mar 2024, 05:41

Hallo,
try:

Code: Select all

!RButton:: ;When Alt+Right Click (holding)
CoordMode, Mouse, Screen
MouseGetPos, StartX, StartY
MouseClickDrag, Left, 0, 0, -1, 790, 0, R
MouseMove, StartX, StartY
Click, Down ; I would like it to hold theh left click
Return

mmflume
Posts: 15
Joined: 29 Nov 2023, 23:27

Re: I wrote a simple MouseClickDrag one, but how would I hold the click?

Post by mmflume » 30 Mar 2024, 08:42

Rohwedder wrote:
30 Mar 2024, 05:41
Hallo,
try:

Code: Select all

!RButton:: ;When Alt+Right Click (holding)
CoordMode, Mouse, Screen
MouseGetPos, StartX, StartY
MouseClickDrag, Left, 0, 0, -1, 790, 0, R
MouseMove, StartX, StartY
Click, Down ; I would like it to hold theh left click
Return
Thank you for the answer!

Post Reply

Return to “Ask for Help (v1)”