Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Chat spammer

timer

  • Please log in to reply
16 replies to this topic

#1 Demon

Demon

    CC Newcomer

  • Just Joined
  • PipPip
  • 18 posts

Posted 20 September 2010 - 12:47 AM

Basic overview

What this will do is send multiple spams written in a text box after the start button is pressed and stop after the second button is pressed. This makes use of basic timer skills and the send keys command.

What you'll need

2 buttons
1 text box
1 timer

Placement

How ever you'd like I'm going to place the 2 buttons under the text box.

Code

For the start button the code would make the timer start:

Timer1.Start()

For the stop button it would make the timer stop:

Timer1.Stop()

And for the timer since it will send the keys in the text box till stopped the code will be:

Sendkeys.Send[Textbox1.Text] Sendkeys.Send("{ENTER}')

And it's as simple as that.
  • 0

#2 Jarryd

Jarryd

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 63 posts
  • Location:Australia
  • Programming Language:C, Java, C++, C#

Posted 25 September 2010 - 07:38 PM

To make it a little more advanced, you could allow the user to change the timer interval:

Timer1.Interval = NumericUpDown1.Value()

That little line of code will allow the user to change the value of the "NumericUpDown", and it will make the spammer go at the speed.
  • 0

#3 CuzImAwesome

CuzImAwesome

    CC Newcomer

  • Member
  • PipPip
  • 22 posts

Posted 21 October 2010 - 08:11 PM

Or:
Timer1.Interval = TextBox2.Text

Just type in the interval.
  • 0

#4 Buffer_overflow

Buffer_overflow

    CC Newcomer

  • Just Joined
  • PipPip
  • 10 posts

Posted 30 December 2010 - 02:52 PM

I've tried in my visual studio and i got this error

Error 1 Argument not specified for parameter 'keys' of 'Public Shared Sub Send(keys As String)'. C:\Users\xxxxxx\Documents\Visual Studio 2010\Projects\WindowsApplication5\WindowsApplication5\Form1.vb 16 9 WindowsApplication5


Error 2 Bracketed identifier is missing closing ']'. C:\Users\xxxxx\Documents\Visual Studio 2010\Projects\WindowsApplication5\WindowsApplication5\Form1.vb 16 22 WindowsApplication5
  • 0

#5 CommittedC0der

CommittedC0der

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1065 posts
  • Programming Language:C#
  • Learning:C#, JavaScript, PL/SQL

Posted 30 December 2010 - 04:48 PM

I've tried in my visual studio and i got this error

Error 1 Argument not specified for parameter 'keys' of 'Public Shared Sub Send(keys As String)'. C:\Users\xxxxxx\Documents\Visual Studio 2010\Projects\WindowsApplication5\WindowsApplicati on5\Form1.vb 16 9 WindowsApplication5


Error 2 Bracketed identifier is missing closing ']'. C:\Users\xxxxx\Documents\Visual Studio 2010\Projects\WindowsApplication5\WindowsApplicati on5\Form1.vb 16 22 WindowsApplication5

Your problem is the quote's around ENTER are messed up, its written: "ENTER' <-- see the one '? It should look like this:
SendKeys.Send(TextBox1.Text)
        SendKeys.Send([B]"[/B]{ENTER}[B]"[/B])
Hope that solves it for you. :)
  • 0
There IS a war going on for your mind.
Nothing of eternal significance happens besides prayer.

#6 Buffer_overflow

Buffer_overflow

    CC Newcomer

  • Just Joined
  • PipPip
  • 10 posts

Posted 31 December 2010 - 03:20 AM

What i need to put in ENTER??
N00b question, but please help me..
  • 0

#7 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 31 December 2010 - 05:06 AM

What i need to put in ENTER??
N00b question, but please help me..

Hi, The {ENTER} phrase in Visual Basic signifies the enter key, so it simulates pressing enter and sends it.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#8 pijatron

pijatron

    CC Lurker

  • Just Joined
  • Pip
  • 3 posts

Posted 06 January 2011 - 10:27 AM

hmm looks nice think ill start of with somethuing simple like this here spammer. thanks
  • 0

#9 pijatron

pijatron

    CC Lurker

  • Just Joined
  • Pip
  • 3 posts

Posted 06 January 2011 - 11:08 AM

hey guys i got everything down buyt i have 1 small error

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Sendkeys.Send(Textbox1.Text) SendKeys.Send("{ENTER}")
End Sub

the error says end ofstatement expected........
a lil help pls...thanks.
  • 0

#10 Demon

Demon

    CC Newcomer

  • Just Joined
  • PipPip
  • 18 posts

Posted 28 January 2011 - 10:20 PM

hey guys i got everything down buyt i have 1 small error

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Sendkeys.Send(Textbox1.Text) SendKeys.Send("{ENTER}")
End Sub

the error says end ofstatement expected........
a lil help pls...thanks.


Have you tried an and or +?
  • 0

#11 Nonja

Nonja

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 08 February 2011 - 10:08 PM

What exactly should I see happen after entering text in the textbox then clicking start? The only thing that happens is my computer gets super laggy until I click Stop.

Here's my code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Start()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Timer1.Stop()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        SendKeys.Send(TextBox1.Text)
        SendKeys.Send("{Enter}")
    End Sub
End Class

I'm brand spanking new to VB so thanks for any help!
  • 0

#12 Demon

Demon

    CC Newcomer

  • Just Joined
  • PipPip
  • 18 posts

Posted 09 February 2011 - 06:42 AM

What exactly should I see happen after entering text in the textbox then clicking start? The only thing that happens is my computer gets super laggy until I click Stop.

Here's my code:

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Start()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Timer1.Stop()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        SendKeys.Send(TextBox1.Text)
        SendKeys.Send("{Enter}")
    End Sub
End Class

I'm brand spanking new to VB so thanks for any help!


You can add a me.hide() statement on the start button,but what should happen is it'll send the keys in the text box,for example if you have a chat text box selected after it's started then it will spam.
  • 0





Also tagged with one or more of these keywords: timer

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download