How to Code a Spam Bot in Notepad

50400

Intro: How to Code a Spam Bot in Notepad

This is a simple way to code a spam bot using VBScript in the program Notepad for PC.  It is designed to be used to annoy your friends and co-workers.  VBScript is a lighter version of Visual Basic, the code that Microsoft uses.  

Lets get started.  All you will need is the program Notepad.  To find it go to /Start/ All Programs/ Accessories/ Notepad.  

In the next step I will go over the different functions we will use in this code.

STEP 1: Functions

The first line of code is this:
set wshshell = wscript.CreateObject("wscript.shell")
It creates an object that is used to preform the actions of the code.

In the next line we have a simple input box:
x = InputBox("What would you like to spam?", "Spam Bot")
It sets the variable x to be the outcome of what is typed into the input box.  The ,"Spam Bot" is the title of the input box, with the comma indicating that it is the title. 

Another function we will use it the sleep function.
WScript.Sleep 1200
The number is in milliseconds, so for instance we will use 1200 milliseconds (1.2 seconds).  This is just a delay for the user to click into the box the message should be spammed into.

Probably the most complicated function we will use is this:
For z = 1 To y
Next
For [any variable] = 1 To [another variable] means it will repeat an action as many times as [another variable].  The [any variable] is just a term used for the code to work and can be named anything.  In this case [another variable] is the input of a second input box, "How many times to spam?".  Spamming a message over two hundred times may crash your computer or at least cause a fair amount of lag.

The final and key part of this code is this:
WshShell.SendKeys x
WScript.Sleep 75
WshShell.SendKeys "~"
WScript.Sleep 10
It fits in right before the 'Next'.  The first part sends the keys represented by the variable x.  Since x is set to be the message that you would like to spam it will send the input of those keys to your computer.  Then it waits 75 milliseconds before sending a '~'.  The ~ represents the press of an enter key in VBScript.  Other keys can be sent with corresponding symbols.  The enter key sends your message out into a chat box.  

In total, the script will ask you what message you would like to spam, then ask how many times you would like to spam it, then repeat as many times as you told it to repeat sending the message out and entering it into the chat.

STEP 2: Final Code

This is the final code:

set wshshell = wscript.CreateObject("wscript.shell")
x = InputBox("What would you like to spam?", "Spam Bot")
y = InputBox("How many times to spam? (over 200 will crash most computers)", "Spam Bot")
WScript.Sleep 1200
For z = 1 To y
WshShell.SendKeys x
WScript.Sleep 75
WshShell.SendKeys "~"
WScript.Sleep 10
Next

To finish, put this into your notepad document and save it as SpamBot.vbs
It must be saved as a .vbs to use the VBScript and make it work.
Change the file type from 'Text Document' to 'All Files'.

When you would like to spam someone, run this program.

Please enjoy and vote for it if you like it!

STEP 3: Credits

VBScript tutorial:
http://www.w3schools.com/vbscript/default.asp

SendKeys corresponding keys:
http://msdn.microsoft.com/en-us/library/8c6yea83(v=vs.85).aspx