Information
*Introduction:
I spent a couple hours making this awesome tutorial for anyone wanting to learn Visual Basic. Please give me some thanks, it was time consuming.
Also, for each tidbit of code down below, each control name is whatever you choose it to be. If you can't understand what each one is, I suggest you not read this as it may make your brain explode. Thanks.
*Goal:
To show anyone reading how to add more advanced(mostly useless), awesome features to your spammer to make it a lot better.
*Requirements:
Basic knowledge of Visual Basic 2008
*Credits:
Myself- these are all my hand written codes. I don't leech. If I see something that may help me with a control or two, I figure out how it works then completely change it.
Google
*Problems:
I am willing to help anyone with any problems they have, just reply or send me a private message.
*Errors:
Please notify me about any errors I made putting this together.
I wrote it all in Notepad first and got a little disoriented with it.
*Visual Reference:
If any of you would like some help with how it may look/need to look. You can view the spammer that I made.
Post link: https://www.mpgh.net/forum/33-visual-...-v1-0-2-a.html
The Codes
(Please give credits to me (Lex) for any spammer you made using this tutorial)
Also, please press Thanks. It goes a long way.
*Hot Keys:
Creating hot keys are really easy and with this, you can set your hot keys to whatever you want by changing (Keys.F6) & (Keys.F7) to (Keys.whatever key you want)
First, at the top of Form1.vb enter this code:
Code:
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Long) As Integer
For the actual hot keys, enter these codes:
In Form1_Load:
Code:
HKTimer.Enabled = True
HKTimer.Interval = 50
Above HKTimer_Tick
Code:
Dim StartHotKey As Boolean
Dim StopHotKey As Boolean
In HKTimer_Tick
Code:
StartHotKey = GetAsyncKeyState(Keys.F6)
StopHotKey = GetAsyncKeyState(Keys.F7)
If StartHotKey = True Then
SpamTimer.Enabled = True
End If
If StopHotKey = True Then
SpamTimer.Enabled = False
End If
*Multiple Lines:
This is amazingly simple. All you have to do is expand on the original anti = 1 code.
For 3 lines of spam:
Code:
If anti = 0 then
SendKeys.Send(SpamTextBox1.Text)
SendKeys.Send("{Enter}")
anti = 1
ElseIf anti = 1 Then
SendKeys.Send(SpamTextBox2.Text)
SendKeys.Send("{Enter}")
Call IncrementCounter()
anti = 2
ElseIf anti = 2 Then
SendKeys.Send(SpamTextBox3.Text)
SendKeys.Send("{Enter}")
anti = 0
You can continue to add an infinite amount of these. If you understand the concept, great. If not, PM me and I can try to help you out better.
*Spam Counter:
To make a counter, you would want some integer to increase by one each time you sent a spam. So, just add these few lines of code.
Add this right below Public Class Form1:
Code:
Dim Counter As Integer = 0
Create a Private Sub for this:
Code:
Private Sub IncrementCounter()
Counter += 1
CounterLabel.Text = Counter
Add this code in each If statement for SpamTimer_Tick:
Code:
Call IncrementCounter()
So, SpamTimer_Tick should look something like this:
Code:
If anti = 0 Then
SendKeys.Send(SpamTextBox1.Text)
SendKeys.Send("{Enter}")
Call IncrementCounter()
anti = 1
ElseIf anti = 1 Then
SendKeys.Send(SpamTextBox2.Text)
SendKeys.Send("{Enter}")
Call IncrementCounter()
anti = 0
End If
*Saving Settings:
This way of saving settings will save whatever you want it to in a registry.
To do this, add this code in a new Save button:
Code:
SaveSetting("Form1", "Checkboxes", "CheckBox1", CheckBox1.CheckState)
SaveSetting("Form1", "Checkboxes", "CheckBox2", CheckBox2.CheckState)
SaveSetting("Form1", "Textboxes", "Textbox1", TextBox1.Text)
SaveSetting("Form1", "Textboxes", "Textbox2", TextBox2.Text)
SaveSetting("Form1", "Textboxes", "Textbox3", TextBox3.Text)
Use this format for saving the current setting of any control on your project.
These 3 textboxes and these 2 checkboxes aren't exactly relevent towards this, but it gives you an idea for what you would like to save.
*Loading Settings:
This is for the same 2 checkboxes and 3 textboxes used above. Again, not relevent at the moment.
Code:
CheckBox1.CheckState = GetSetting("Form1", "CheckBoxes", "CheckBox1", "")
CheckBox2.CheckState = GetSetting("Form1", "CheckBoxes", "CheckBox2", "")
TextBox1.CheckState = GetSetting("Form1", "TextBoxes", "TextBox1", "")
TextBox2.CheckState = GetSetting("Form1", "TextBoxes", "TextBox2", "")
TextBox3.CheckState = GetSetting("Form1", "TextBoxes", "TextBox3", "")
*Interval Settings:
For setting your interval, you can use a couple ways. I'm going to show you how to make a custom value or use a trackbar.
So, first, you need to pick how many values & what the interval is.
For this demonstration, I'll be using 10 different values with an interval of 250.
Put this in the IntervalTrackBar_Scroll:
Code:
IntervalTrackBar.Maximum = ("10")
IntervalTrackBar.Minimum = ("1")
IntervalTrackBar.TickFrequency = ("1")
If IntervalTrackBar.Value = 1 Then
SpamTimer.Interval = 250
IntervalTextBox.Text = 250
End If
If IntervalTrackBar.Value = 2 Then
SpamTimer.Interval = 500
IntervalTextBox.Text = 500
End If
I hope you get the picture, as I am not going to continue typing this code all the way up to value = 10.
Also, you can customize the entire thing however you would like.
Now, for the custom value, enter this code in SetIntervalButton_Click
Code:
If IsNumeric(IntervalTextBox.Text) = False Then
MsgBox("MsgBox(Incorrect Value. Please enter a number.")
EsleIf IsNumeric(IntervalTextBox.Text) = True Then
SpamTimer.Interval = IntervalTextBox.Text
End If
*CheckBoxes and RadioButtons That Enable/Disable Controls
So you can basically add a radiobutton or checkbox to enable/disable any function on your spammer.
For this, I'll be enabling/disabling hotkeys, always on top, and have a switch for interval settings.
For hot keys, enter this code in HotKeyCheckBox_CheckChanged:
Code:
If HotKeyCheckBox.Checked = True Then
HKTimer.Enabled = True
End If
If HotKeyCheckBox.Checked = False Then
HKTimer.Enabled = False
End If
For Always On Top, enter this code in OnTopCheckBox_CheckChanged:
Code:
If OnTopCheckBox.Checked = True Then
Me.TopMost = True
ElseIf OnTopCheckBox.Checked = False Then
Me.TopMost = False
End If
For switching between interval settings, enter this code in TrackBarRadioButton_CheckChanged:
Code:
If TrackBarRadioButton.Checked = True Then
CustomValueRadioButton.Checked = False
IntervalTrackBar.Enabled = True
ElseIf TrackBarRadioButton.checked = False Then
IntervalTrackBar.Enabled = False
End If
Now, enter this code in CustomValueRadioButton_CheckChanged:
Code:
If CustomValueRadioButton.Checked = True Then
TrackBarRadioButton.Checked = False
IntervalTextBox.Enabled = True
ElseIf customValueRadioButton.checked = False Then
IntervalTextBox.Enabled = False
End If
*Creating a Log:
To create a log, you want something that would make a post in a richtextbox every time something happens, so in each control that you want logged, put this code:
Code:
RTBLog.SelectionStart = Len(RTBLog.Text)
RTBLog.SelectedText = vbCrLf & "Your log text here."
Also, to make sure it auto scrolls to the bottom, put this code in RTBLog_TextChanged:
Code:
RTBLog.SelectionStart = RTBLog.TextLength
RTBLog.ScrollToCaret()
*Saving the Log:
Enter this code in SaveLogButton_Click:
Code:
With RTBLog
.SelectionStart = 1
.SelectionLength = 5
.SelectionColor = Color.Black
.SaveFile("Log.rtf", 0)
End With