Mouse hold using keys Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Duo
Posts: 5
Joined: 21 Dec 2022, 08:28

Mouse hold using keys

Post by Duo » 03 Jun 2023, 07:45

:crazy: Guy i need help creating, the game doesn't have key to move left or right, it need hold to move, my experience still too low, try all the way on my experience but can't. So i need someone help me that.
Example: when i hold the Left key then mouse move to left and hold. Or i release Left key then mouse stop holding

Thank you so much. :D

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: Mouse hold using keys

Post by mikeyww » 03 Jun 2023, 14:40

Code: Select all

#Requires AutoHotkey v1.1.33
dist := 10

Left::
While GetKeyState("Left", "P")
 MouseMove -dist, 0, 1, R
Return

Duo
Posts: 5
Joined: 21 Dec 2022, 08:28

Re: Mouse hold using keys

Post by Duo » 03 Jun 2023, 17:35

mikeyww wrote:
03 Jun 2023, 14:40
[Mod edit: Fixed quote tags - and removed green checkmark.]

Sorry i accidentally press the solved button,
The code i need is mouse click hold not moving, sorry very much. :facepalm:
So the example i said that when press and hold Left key then click and hold until release the Left key so it stop holding click.
Thank you again

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: Mouse hold using keys  Topic is solved

Post by mikeyww » 03 Jun 2023, 19:21

Code: Select all

#Requires AutoHotkey v1.1.33
Left::LButton

Post Reply

Return to “Gaming Help (v1)”