Hello fellow ahk community :) I have a small request.

Ask gaming related questions (AHK v1.1 and older)
DSmokE
Posts: 7
Joined: 18 Apr 2021, 11:11

Hello fellow ahk community :) I have a small request.

03 Aug 2021, 04:50

I have got this script, edited it a bit and i want to basically make it spam a key (h) for 10 sec, then stop for sec or two and do the spam of 10 sec again and do that over and over again (infinite).

Here's the code of a script that i'm workin' with:

Code: Select all

$*F1::
If State=425
State=Off
else
State=425
SetTimer SendKey, %State%
Return

SendKey:
Send {Blind}{h}
Return
[Mod edit: [code][/code] tags added.]

I know this is something very easily to do for someone who is in ahk scripts for long time but im new here and still learning. Thanks for help ahead. :)
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Hello fellow ahk community :) I have a small request.

03 Aug 2021, 05:48

Code: Select all

F1::
SetTimer, Spam, 20
SetTimer, Stop, -10000
Spam:
Send h
Return

Stop:
SetTimer, Spam, Off
Sleep, 1000
Gosub, F1
Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 83 guests