`SLYa)W0'DO!9?!(rSF7xd"<an>3i&Sw`+&_XP-[Qj7?1@VDDAQHxFdbA+y}yx"8|!XWVbJYS52xYpS2.}Tt![k!4dF.C`x6_NKnv4V<|';a[#{Pvba#aoca Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Rohwedder
Posts: 7623
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: 4 and click script ?

21 Sep 2021, 02:25

Hallo,
do you want something like this?:

Code: Select all

CapsLock::SetTimer, CapsLock Up,% (CL:=!CL)?50:"Off" ;toggles: every 50 ms/off
CapsLock Up::SendInput,% CL?"{4}{Click}": ;types 4 and then clicks left
A Timer is not suitable for very fast repetition rates, because its period (here 50 ms) is typically rounded up to the next multiple of 10 or 15.6 ms (depending on the type of hardware and the installed drivers).
Rohwedder
Posts: 7623
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: 4 and click script ?

21 Sep 2021, 06:17

The number in the first line (currently it is 50) means 50 ms period, i.e. the time between two SendInput, {4}{Click} . If you increase the number then the timer fires slower (and vice versa).
Rohwedder
Posts: 7623
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: 4 and click script ?

21 Sep 2021, 06:58

Code: Select all

*CapsLock::SetTimer, CapsLock Up,% (CL:=!CL)?30:"Off" ;toggles: every 30 ms/off
*CapsLock Up::SendInput,% CL?"{4}": ;types 4 and then clicks left
Rohwedder
Posts: 7623
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: 4 and click script ?  Topic is solved

21 Sep 2021, 09:27

then try:

Code: Select all

*CapsLock::SetTimer, vk-1,% (CL:=!CL)?30:"Off" ;4 every 30 ms
vk-1::SendInput, 4
*CapsLock Up::SetTimer, vk-2,% CL?100:"Off" ;Click every 100 ms
vk-2::Click

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 70 guests