Want to write script for continues loop

Ask gaming related questions
silentgamer554
Posts: 1
Joined: 07 Jan 2024, 03:43

Want to write script for continues loop

07 Jan 2024, 03:47

Want the loop to avoid kick from game. Want any two button from w, a, s, d to pressed after every few interval.


[Mod edit: Moved topic from 'Tutorials (v2)'.]
User avatar
mikeyww
Posts: 27261
Joined: 09 Sep 2014, 18:38

Re: Want to write script for continues loop

07 Jan 2024, 07:23

Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v2.0

F3:: {
 Static on := False, interval := 900
 SetTimer(go, interval * on ^= True), (on) && go()
}

go() {
 SetKeyDelay 25, 25
 Loop 2
  SendEvent SubStr("wasd", Random(1, 4), 1)
}

Return to “Gaming”

Who is online

Users browsing this forum: adam86shadow and 11 guests