Results 1 to 10 of 10
  1. #1
    Golden.'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    156
    Reputation
    10
    Thanks
    3
    My Mood
    Amazed

    [HELP] Text Change

    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

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    button1.text = "Spam started"

    complicated? lulz.



  3. #3
    MJLover's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Neverland
    Posts
    759
    Reputation
    33
    Thanks
    110
    My Mood
    Cheerful
    Quote Originally Posted by Golden. View Post
    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
    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

  4. #4
    Golden.'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    156
    Reputation
    10
    Thanks
    3
    My Mood
    Amazed
    wow fk me, never thought of that xD
    Cheers!

  5. #5
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    People, if you have intellisense, Use it
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  6. #6
    Golden.'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    156
    Reputation
    10
    Thanks
    3
    My Mood
    Amazed
    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?!

  7. #7
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    790
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    Code:
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
            TextBox1.Text = Timer1.Interval
        End Sub
    Wouldn't the program crash if someone put in like "abc" in the textbox?

    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)

  8. #8
    Golden.'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    156
    Reputation
    10
    Thanks
    3
    My Mood
    Amazed
    Quote Originally Posted by MugNuf View Post
    Code:
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
            TextBox1.Text = Timer1.Interval
        End Sub
    Wouldn't the program crash if someone put in like "abc" in the textbox?

    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)
    Yeah, thats a problem i know and will work on later..
    But answer my above question ^^ :P

  9. #9
    DayumKen's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Houston, Texas, USA.
    Posts
    130
    Reputation
    10
    Thanks
    46
    My Mood
    Inspired
    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.

  10. #10
    MJLover's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Neverland
    Posts
    759
    Reputation
    33
    Thanks
    110
    My Mood
    Cheerful
    Quote Originally Posted by Golden. View Post
    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?!
    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 Sub
    Code:
        Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
            Timer1.Enabled = False
        End Sub
    Code:
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            End
        End Sub
    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
    If 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 !!

Similar Threads

  1. [Help]Rof change
    By blackgu1323 in forum Combat Arms Mod Discussion
    Replies: 4
    Last Post: 01-09-2010, 04:01 PM
  2. [Help me] Changing moddels problem.
    By devinkoz in forum Combat Arms Mod Discussion
    Replies: 1
    Last Post: 01-03-2010, 10:01 AM
  3. NEED HELP FOR CHANGING HOTKEYS
    By imsonoob08 in forum Combat Arms Help
    Replies: 4
    Last Post: 01-01-2010, 11:56 PM
  4. Help me change firerate of gun?
    By D3rknesSnper in forum Combat Arms Mod Discussion
    Replies: 4
    Last Post: 12-26-2009, 08:14 PM
  5. Need Help On Changing The License of a vip hack/Machine id
    By cl1nt411 in forum Combat Arms Hacks & Cheats
    Replies: 4
    Last Post: 04-17-2009, 11:42 PM