Random Key presser to use in windowed game? Topic is solved

Ask gaming related questions (AHK v1.1 and older)
IwannabetheBERRYbest

Random Key presser to use in windowed game?  Topic is solved

18 Oct 2017, 22:00

I was wondering if I can get some code that will push the arrow keys, z,x,shift and enter randomly with a delay of .2 seconds. I do not know how to program it myself, hence why I came to these forums. Thanks for anyone who responds!
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: Random Key presser to use in windowed game?

19 Oct 2017, 00:35

Read up on these links for an example on doing autofire (repeated presses): (Note: The first link is from the old forums, the second link is on these forums) http://www.autohotkey.com/board/topic/6 ... re-thread/ or https://autohotkey.com/boards/viewtopic.php?f=7&t=11952

For your keys, see Send/KeyList.

To make them random, I recommend the random command. Use a range of 1-8, Random, var, 1, 4. Then use If var=1, and up through If var=8, to send a particular key.

I personally recommend using a SetTimer routine on every 200 milliseconds.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 89 guests