Left Mouse Auto Hot Key With Toggle Key

Ask gaming related questions
packrunner
Posts: 1
Joined: 07 Apr 2024, 21:34

Left Mouse Auto Hot Key With Toggle Key

07 Apr 2024, 21:42

Hi, I was wondering if anyone would be able to make me/ edit a script for AutoHotkey v2. Basically, I need a script like this one here:

Code: Select all

#Requires AutoHotkey v2.0
auto := False

CapsLock:: {
 Global auto := !auto
 SoundBeep 1000 + 500 * auto
}

#HotIf auto
LButton:: {
 SetKeyDelay 15, 15
 While GetKeyState(ThisHotkey, "P")
  SendEvent '{' ThisHotkey '}'
}
#HotIf
F10::ExitApp
This script is toggled by CapsLock and makes a beep sound so that you know when it has been toggled on or off. When it is on, when I hold down the Left Mouse Button, it rapidly clicks it at 35 CPS (Tested via this website https://clickspeedtest.com/clicks-per-second.html). The script works a charm, I just wish it was faster and I myself don't know how to increase the speed. I tried changing the SetKeyDelay lower, but either it didn't work or I did it wrong. If anyone could either explain to me how to customize the speed or make it to where it is faster it would be much appreciated. :D

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code! Also, the topic was moved to the 'Gaming' subforum.]
User avatar
mikeyww
Posts: 27136
Joined: 09 Sep 2014, 18:38

Re: Left Mouse Auto Hot Key With Toggle Key

08 Apr 2024, 07:30

Hello,

Instead of posting the working script, post the script that does not work.

You can lower the key delay & press duration if you wish. SendInput is an alternative.

There is nothing magical here. You are not going to get to 1000 CPS. Instead, you'll have to become a skilled gamer! :)

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 6 guests