Page 1 of 1

How to make A Simple Auto-Writer

Posted: Wed Dec 08, 2010 7:39 am
by CleverBoy
Hello Guys

In this tutorial in going to show you how to make a simple auto-writer
start vb > Create new project

Components :
2 Buttons
1 Textbox
1 Checkbox
1 Timer
1 NumericUpDown

Change Button1 Text to Start
Change Button2 Text to Stop
Change Checkbox1 Text to Send Enter

Button1 - it will start the timer ( THE AUTO-WRITER WILL START )
Code: Select all
Timer1.start
Button2 - it will stop the timer
Code: Select all
Timer1.stop
Timer1 Code :
Code: Select all
        Timer1.Interval = NumericUpDown1.Value & "000" ' Interval = Speed , every 1000 = sec so it will put after the value "000"
        If CheckBox1.CheckState = CheckState.Checked Then
            On Error Resume Next
            SendKeys.Send(TextBox1.Text)
            SendKeys.Send("{Enter}")
        Else
            On Error Resume Next
            SendKeys.Send(TextBox1.Text)
        End If
The Whole Codes ( DELETE ALL THE CODES AND PASTE THIS )
Code: Select all
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
        Timer1.Interval = NumericUpDown1.Value & "000"
        If CheckBox1.CheckState = CheckState.Checked Then
            On Error Resume Next
            SendKeys.Send(TextBox1.Text)
            SendKeys.Send("{Enter}")
        Else
            On Error Resume Next
            SendKeys.Send(TextBox1.Text)
        End If
    End Sub
End Class
Thanks :D

Re: How to make A Simple Auto-Writer

Posted: Wed Dec 08, 2010 4:29 pm
by Usman55
Thanks for the appreciation cleverboy. I never made a tutorial in my whole life but I just started creating last week and have like 5 tutorials right now. I was inspired by codenstuff's tutorials and thought that my tutorial would also be posted in the Tutorials and Downloads section so I tried to make them as good as possible.

Re: How to make A Simple Auto-Writer

Posted: Sun Feb 27, 2011 7:10 pm
by velnens123
I have an better code, so you dont get errors!
Code: Select all
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Start()
        Button1.Enabled = False
        Button2.Enabled = True
        TextBox1.Enabled = False
        NumericUpDown1.Enabled = False
        CheckBox1.Enabled = False
        If NumericUpDown1.Text = "" Or NumericUpDown1.Text = "0" Then
            MessageBox.Show("Please enter valid value!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Button2.PerformClick()
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Timer1.Stop()
        Button1.Enabled = True
        Button2.Enabled = False
        TextBox1.Enabled = True
        NumericUpDown1.Enabled = True
        CheckBox1.Enabled = True
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Timer1.Interval = NumericUpDown1.Value & "000"
        If CheckBox1.CheckState = CheckState.Checked Then
            On Error Resume Next
            SendKeys.Send(TextBox1.Text)
            SendKeys.Send("{Enter}")
        Else
            On Error Resume Next
            SendKeys.Send(TextBox1.Text)
        End If
    End Sub
End Class

Re: How to make A Simple Auto-Writer

Posted: Mon Feb 28, 2011 12:10 am
by MasterComputer
if you add some text then it will be able to even send commands like enter

Re: How to make A Simple Auto-Writer

Posted: Mon Feb 28, 2011 12:32 am
by Agust1337
Isnt this more of a spammer?

Re: How to make A Simple Auto-Writer

Posted: Mon Feb 28, 2011 12:40 am
by code it
Yes it is,he means by auto-writter that it automatically writes I think :P

Re: How to make A Simple Auto-Writer

Posted: Mon Feb 28, 2011 5:57 pm
by CleverBoy
Sorry guys if it is a Spamming tutorial then sorry for this is mean this is a feature you can add it to your Text editor,, Thanks