Script for game

Ask gaming related questions
ShaneBrede
Posts: 3
Joined: 06 Dec 2023, 16:24

Script for game

Post by ShaneBrede » 06 Dec 2023, 16:40

Hello,

can you help me?,i need a script for a game for a three buttons,when i hold these ones-numpad1,numpad2,numpad3 i need 1000 clicks/or less/ to each of them permanently,until release that buttons,

Thank you for your help.

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

Re: Script for game

Post by mikeyww » 07 Dec 2023, 09:01

Welcome to this AutoHotkey forum!

So you want either 1000 clicks, or less than 1000 clicks, right? Which is it?

What is a "click to each of them?"

What is a permanent click, as opposed to a temporary one?

I do not recommend a three-key hotkey, because AHK cannot provide consistent results with more than two non-modifier keys. See the documentation for details.

ShaneBrede
Posts: 3
Joined: 06 Dec 2023, 16:24

Re: Script for game

Post by ShaneBrede » 07 Dec 2023, 11:42

mikeyww wrote:
07 Dec 2023, 09:01
Welcome to this AutoHotkey forum!

So you want either 1000 clicks, or less than 1000 clicks, right? Which is it?

What is a "click to each of them?"

What is a permanent click, as opposed to a temporary one?

I do not recommend a three-key hotkey, because AHK cannot provide consistent results with more than two non-modifier keys. See the documentation for details.
Thank you for your reply,

i need 1000 clicks for each buttons,so when i press and hold those buttons,script is start,until i let them go.i just need these buttons,its a simple game,not need more.

thank you for your help.

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

Re: Script for game

Post by mikeyww » 08 Dec 2023, 09:47

Code: Select all

#Requires AutoHotkey v2.0

Numpad1:: {
 Loop 1000
  Click
 Until !GetKeyState(ThisHotkey, 'P')
}

ShaneBrede
Posts: 3
Joined: 06 Dec 2023, 16:24

Re: Script for game

Post by ShaneBrede » 08 Dec 2023, 12:07

mikeyww wrote:
08 Dec 2023, 09:47

Code: Select all

#Requires AutoHotkey v2.0

Numpad1:: {
 Loop 1000
  Click
 Until !GetKeyState(ThisHotkey, 'P')
}
Thank you so much,it works perfectly,maybe one question,it is possible to make short delay in miliseconds between the clicks,1 milisecond?

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

Re: Script for game

Post by mikeyww » 09 Dec 2023, 08:56

You can try :arrow: SetMouseDelay.

Post Reply

Return to “Gaming”