How to increase macro speed? :(

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Murilo Pereira
Posts: 1
Joined: 18 Jun 2018, 21:46

How to increase macro speed? :(

18 Jun 2018, 21:57

Hello friends,
I would like to know how I can increase the macro speed used in this script (F1, F2 etc..)
When this macro is active it clicks a little slow

Could someone change the speed macro of this script to help me, please?

Thank you so much

Thread, interrupt, 0

togF1 := 0
$F1::
togF1 := !togF1
if (togF1) {
SetTimer, RepeatOne
}
else {
SetTimer, RepeatOne, Off
}
return

RepeatOne:
Send {q}
return


togF2 := 0
$F2::
togF2 := !togF2
if (togF2) {
SetTimer, RepeatTwo
}
else {
SetTimer, RepeatTwo, Off
}
return

RepeatTwo:
Send {w}
return


togF3 := 0
$F3::
togF3 := !togF3
if (togF3) {
SetTimer, RepeatThree
}
else {
SetTimer, RepeatThree, Off
}
return

RepeatThree:
Send {e}
return


togF4 := 0
$F4::
togF4 := !togF4
if (togF4) {
SetTimer, RepeatFour
}
else {
SetTimer, RepeatFour, Off
}
return

RepeatFour:
Send {r}
return
gregster
Posts: 9020
Joined: 30 Sep 2013, 06:48

Re: How to increase macro speed? :(

18 Jun 2018, 22:17

You don't specify a timer speed. In this case, the default period is 250 milliseconds (that means, it gets executed 4 times a second).
Try something like

Code: Select all

SetTimer, RepeatOne, 100
(ten times a second) or SetTimer, RepeatOne, 50
Also note the remarks in the SetTimer docs, that periods of less 10-16 ms are not really possible with this approach (there is an alternative mentioned, but too fast clicks/keypresses might make you suspicious in most games, anyway).

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, Rohwedder and 315 guests