random movement

Ask gaming related questions (AHK v1.1 and older)
Magija
Posts: 21
Joined: 21 Aug 2021, 06:29

random movement

Post by Magija » 16 Jan 2022, 04:24

Hi, I would like to create a system that will random walk.

Typing the command ":?: / Rm" starts pressing these buttons randomly "a, s, d, w"

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: random movement

Post by Rohwedder » 16 Jan 2022, 04:39

Hallo,
try:

Code: Select all

:?X:/ Rm::SetTimer, RaWa, 100
RaWa:
Random, Ran, 1, 4
Send,% SubStr("asdw", Ran, 1)
Return
or:

Code: Select all

:?:/ Rm::
SetTimer, :?:/ Rm, 100
Random, Ran, 1, 4
Send,% SubStr("asdw", Ran, 1)
Return

Post Reply

Return to “Gaming Help (v1)”