Help script: start and suspend the script by pressing the F12 key

Ask gaming related questions
Melipilla
Posts: 2
Joined: 19 Sep 2022, 09:41

Help script: start and suspend the script by pressing the F12 key

19 Mar 2024, 10:54

Hello, I need help with this code.

Code: Select all

LButton::SetMouseDelay(-1), Click(4)

RButton::LButton
This script is used to click with the least possible delay. Now I want to add to START AND SUSPEND the script by pressing the F12 key

Besides that, I have a problem, it is that in the game I use the SHIFT key for some things, the problem is that when activating the script, the SHIFT does not work in the game, I don't know if I should add the SHIFT key to the script, its The function is normal as on the keyboard.

If anyone could help me please
User avatar
mikeyww
Posts: 27214
Joined: 09 Sep 2014, 18:38

Re: Help script: start and suspend the script by pressing the F12 key

19 Mar 2024, 19:25

Code: Select all

#Requires AutoHotkey v2.0
on := False

F12:: {
 Global on ^= True
 SoundBeep 1000 + 500 * on
}

#HotIf on
LButton::SetMouseDelay(-1), Click(4)
RButton::LButton
#HotIf
  1. This script does not directly affect Shift.
  2. The hotkeys are not triggered when Shift is held first.
  3. See KeyHistory to understand what is happening with your keys.
  4. Suspend is another way to suspend hotkeys.
  5. Test this script in Notepad, with no changes or additions, to understand what it does.

Return to “Gaming”

Who is online

Users browsing this forum: Patrycy and 3 guests