I don't know how to make a "w" spam Topic is solved

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

I don't know how to make a "w" spam

15 Feb 2018, 11:54

can someone teach me how to do it, please I really need it
User avatar
eventhorizon
Posts: 158
Joined: 27 Oct 2016, 14:22

Re: I don't know how to make a "w" spam  Topic is solved

15 Feb 2018, 15:31

Teaching how to code is easy. ACtually coding a working program or script is a bit harder. The first thing to remember is that the computer will do EXACTLY what you tell it to do. Nothing more and nothing less. So if you tell it to do garbage then it does garbage. There are lots of ways to start building a program, using charts and diagrams, jumping right into the coding and my personal favorite PseudoCode. With PseudoCode you write down a description of each step of the program or script you want to build in a kind of English (or whatever other language you prefer to write in). Then you break the complex steps down into simpler and simpler steps until you cannot go any further reducing them until you actually have to write the instructions in some computer language. Then you pick the computer language you choose to write in (in this case AutoHotkey) and begin writing the code itself. This is where the help file comes in so handy. All the commands are listed with the all the pieces called arguments it needs to work correctly. You pick the commands that do the job you want for the step you're on and then move to the next step over and over until the whole script is written. Then comes the fun part. you save off the stuff you wrote in some kind of file your coding program can recognize. With Autohotkey that's an ahk file. then you run the program. find any errors you made. fix them. Save the altered code, and run it again. over and over until it works exactly like you want it to. It's a fun, challenging and in some cases a mindbending experience. but there's no rush like it in the whole world when a program or script you made actually works like it's supposed to.
with all that in mind a w spam script might look like this ; By the way the most important command you will ever learn in any computer language is the comment command. My own special favorite. Some computer languages have more than one of them.

Code: Select all

; pseudo code might look something like this
; start spamming the w key
;		press the w key
; 		keep spamming until i tell you to stop
;			if the w key isn't being held down then stop spamming		
; then go back to doing nothing until i need you again
;
; and the real code might look something like this...
$w:: ;<- pressing w starts this off
	Loop ;<- go into a loop that keeps working forever
	{	send w ;<- send the w key
		if (!getkeystate("w","p")) ;<- see if i let go of the w key
		{	break ;<- if I did than stop the spamming loop
		}
	}
	return ;<- go back to doing nothing until i need you again
and basically that's how it's done. Simple and not exactly simple. Just keep in mind that coding is not a spectator sport. you actually have to do the coding to learn how to code and fix and rebuild and make it all work right.
A computer lets you make more mistakes faster than any invention in human history – with the possible exceptions of handguns and tequila.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 80 guests