[C#]Basic Auto Typer

Keno

Member
Mar 12, 2012
70
17
Hi cutie pies this section looks dead and I'm bored so here's how to make a basic 'auto typer'.
zivd.png

Before we continue I'd suggest reading these:
SendKeys Class:
try-catch :
Start a new project in Visual Studio using WFA and add a text box, timer, combo box and a button then name them whatever you want and add suitable text!!
Once you've done that view the form's code and let's add a few lines of code to the constructor to initialise some values.

Code:
  public Form1() {
            ...
            button1.Text = "Start";
            comboBox1.Text = "500";
            comboBox1.Items.AddRange(new object[] { "1000", "1500", "2000", "2500", "3000", "3500", }); //Adds these values to the cbox
            ... }
Go back to the design in find your timer double click it and add this code!!!!
Code:
        private void timer1_Tick(object sender, EventArgs e) {
            SendKeys.Send(textBox1.Text); // Please read the SendKeys class reference I provided above if you have not :@
            SendKeys.Send("{ENTER}");
        }
Go back to the design, double click your send button and let's add some code woo!!!
Code:
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (button1.Text == "Start")
                {
                    timer1.Interval = Int32.Parse(comboBox1.Text);
                    button1.Text = "Stop";
                    timer1.Start();
                }
                else
                {
                    button1.Text = "Start";
                    timer1.Stop();
                }
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Woah!!1!one!! you've done it now you have an auto typer ^^, now go mess around with it haha. If I made an error srry wrote it in notepad :( but it looks ok.
Any tutorial requests? Advanced/basic Java & C# only pls :( if I'm bored I'll write one up ;*
 
Last edited:

Rastaberry

Rooster 4 president 2k14
Dec 3, 2010
247
29
Thanks for the tutorial your certainly helping c# noobs ( Like me ).

So thanks for the good and well detailed tutorial and hopefully you'll soon succeed to make this thread more alive.
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
Nothing really big, One can find these on internet as well if they make an effort to google it. But it's a bad spammer, You've need a STOP button as well.
 

Keno

Member
Mar 12, 2012
70
17
Nothing really big, One can find these on internet as well if they make an effort to google it. But it's a bad spammer, You've need a STOP button as well.
I agree but there is a stop button if you read the code haha :p.
 

Hindi

System.out.println(" ");
Dec 30, 2012
989
192
I agree but there is a stop button if you read the code haha :p.
figured it, So when the spammer starts, the text on button1 changes to Stop and when its stopped, It changes to start, but one thing I'd like to tell ya, When you are spamming something at such a fast rate, Your mouse freezes and you can't really stop it. (No its not a problem of my laptop)
 

Users who are viewing this thread

Top