Still learning everything and I gained a bit of knowledge doing this so I thought I would release it here so others could possibly use bits of it to learn from.
Finished Product design:
Source:
Code
Public Class Form1
Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Integer
Private Sub buttonAdd_Click(sender As Object, e As EventArgs) Handles buttonAdd.Click
Dim text As String = textBoxSpam.Text
listSpam.Items.Add(textBoxSpam.Text)
labelStatus.Text = String.Format("Added: {0}", text)
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim random As Integer = (Math.Ceiling(Rnd() * 9)) + 1
Dim listRandom As String = String.Format("{0} {1}", listSpam.SelectedItem, random)
If checkRandomNumbers.Checked Then
SendKeys.Send(listRandom)
SendKeys.Send("{Enter}")
If listSpam.SelectedIndex = listSpam.Items.Count - 1 Then
listSpam.SelectedIndex = 0
Else
listSpam.SelectedIndex += 1
End If
ElseIf Not checkRandomNumbers.Checked Then
SendKeys.Send(listSpam.SelectedItem)
SendKeys.Send("{Enter}")
If listSpam.SelectedIndex = listSpam.Items.Count - 1 Then
listSpam.SelectedIndex = 0
Else
listSpam.SelectedIndex += 1
End If
End If
End Sub
Private Sub buttonStart_Click(sender As Object, e As EventArgs) Handles buttonStart.Click
Dim trackBarVal As String = trackBar.Value
Dim textboxVal As String = textInterval.Text
If IsNumeric(textInterval.Text) Then
Timer1.Interval = textInterval.Text * 1000
Timer1.Start()
labelStatus.Text = String.Format("Spamming at {0}", textboxVal)
Else
Timer1.Interval = trackBar.Value * 1000
Timer1.Start()
labelStatus.Text = String.Format("Spamming at {0} Seconds", trackBarVal)
End If
End Sub
Private Sub buttonStop_Click(sender As Object, e As EventArgs) Handles buttonStop.Click
listSpam.SelectedIndex = 0
If (Timer1.Enabled) Then
Timer1.Stop()
labelStatus.Text = ("Stopped!")
End If
End Sub
Private Sub NexusButton2ColorRed1_Click(sender As Object, e As EventArgs) Handles NexusButton2ColorRed1.Click
listSpam.Items.Remove(listSpam.SelectedItem)
labelStatus.Text = ("Removed Item")
End Sub
Private Sub trackBar_Scroll(sender As Object) Handles trackBar.Scroll
textInterval.Text = trackBar.Value
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
If GetKeyPress(Keys.F11) Then
If Timer1.Enabled = False Then
listSpam.SelectedIndex = 0
Timer1.Interval = textInterval.Text * 1000
Timer1.Start()
End If
End If
If GetKeyPress(Keys.F12) Then
If Timer1.Enabled = True Then
Timer1.Stop()
End If
End If
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Timer2.Interval = 500
Timer2.Start()
End Sub
End Class
Theme download
Nexus Theme
I doubt it's against the rules to link to the solution download but gonna check to make sure so if you want it before I get it here pm me.
Thanks a lot to Earn who helped out a ton and Layle for the awesome theme 😁