I need an independent loop that presses ¨w¨and ¨s¨ infinitely

Ask gaming related questions (AHK v1.1 and older)
EmileWolf
Posts: 5
Joined: 13 Jan 2022, 09:42

I need an independent loop that presses ¨w¨and ¨s¨ infinitely

Post by EmileWolf » 13 Jan 2022, 14:01

I already have my code, it essentially loops certain keystrokes that adjust to what I need exactly but I need a new ¨loop¨ or something else that can infinitely repeat a cycle between pressing w and s, it needs to be independent from the rest of my script.

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

Re: I need an independent loop that presses ¨w¨and ¨s¨ infinitely

Post by mikeyww » 13 Jan 2022, 15:45

Code: Select all

#Persistent
SetTimer, Infinite, 50
Return

Infinite:
Send ws
Return

EmileWolf
Posts: 5
Joined: 13 Jan 2022, 09:42

Re: I need an independent loop that presses ¨w¨and ¨s¨ infinitely

Post by EmileWolf » 19 Jan 2022, 14:40

How can I use this with a hotkey?

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

Re: I need an independent loop that presses ¨w¨and ¨s¨ infinitely

Post by mikeyww » 19 Jan 2022, 19:18

Code: Select all

F3::SetTimer, Infinite, 50
Infinite:
Send ws
Return

Post Reply

Return to “Gaming Help (v1)”