button1.text = "Spam started"
complicated? lulz.
ok so this is quite complicated, i hope you get what i mean...
I Have a basic spammer with 2 buttons, Stop and Start
When they press start, i want the button text to say " Spam Started "
And when they press stop, " Spam Stopped "
Here is my code so far:
Public Class Form1
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Enabled = True Dim SAPI SAPI = CreateObject("sapi.spvoice") SAPI.Speak("Thanks for using") End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Timer1.Enabled = False End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick SendKeys.Send(TextBox2.Text) SendKeys.Send("{Enter}") End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged TextBox1.Text = Timer1.Interval End Sub End Class
button1.text = "Spam started"
complicated? lulz.
Assuming that you use Button1 for starting and stopping spam:
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Button1.Text="Spam Started" Then Button1.Text = "Spam Stopped" 'Spam stopped code here !!! Else 'Spam started code here !!! Button1.Text="Spam Started" End If End Sub
wow fk me, never thought of that xD
Cheers!
People, if you have intellisense, Use it
Light travels faster than sound. That's why most people seem bright until you hear them speak.
now i have another problem, ( i dont wanna start a new thread, its spamming :P )
I Found this code:
Dim SAPI
SAPI = CreateObject("sapi.spvoice")
SAPI.Speak("Text here")
Which makes it say whatever, its pretty cool xD
But when it starts, it will keep repeating, how do i make it do it just 1 time?!
Wouldn't the program crash if someone put in like "abc" in the textbox?Code:Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged TextBox1.Text = Timer1.Interval End Sub
Your problem isn't complicated at all.
When you click button 1, Timer1.Start - Button1.Text = "Spamming!"
When you click button 2, Timer1.Stop - Button1.Text = "Idle!"
Just change the text to what you want. (Button1 is Start, Button2 is Stop)
Or just add a label and add this to the Start button:
Label1.Text = "Spam Started!"
and for Stop button:
Label1.Text = "Spam Stopped!"
Last edited by DayumKen; 06-28-2010 at 01:41 PM.
Here's the modified code:
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Enabled = True Dim SAPI SAPI = CreateObject("sapi.spvoice") SAPI.Speak("Thanks for using") End SubCode:Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Timer1.Enabled = False End SubCode:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End SubIf you want to just send it once, then try just adding the Timer1 code to Button 1. That'll work too !! Anyways, this is a solution too !!Code:Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick SendKeys.Send(TextBox2.Text) SendKeys.Send("{Enter}") Timer1.Stop() Timer1.Enabled=False End Sub