• Log in or sign up for an account here: https://www.sythe.org/login

Efficient Auto Talker

Joined
Sep 18, 2009
Sythe Gold
0
Messages
308
Well, this is a auto talker I made.

You will need

2 buttons, start and stop.
And a textbox.
And a Timer.


Here is the code -

Under
Code:
public partial class Form1 : Form
{

Declare

Code:
int count = 0;

It is then like

Code:
public partial class Form1 : Form
{
int count = 0;

Under
Code:
    public Form1()
        {
            InitializeComponent();
        }

Add this

Code:
    public void stopProcess(String File)
        {
            System.Diagnostics.Process[] process = System.Diagnostics.Process.GetProcesses();
            for (int i = 0; i <= process.GetUpperBound(0); i++)
            {
                if (process[i].ProcessName == File)
                {
                    process[i].Kill();
                }
            }
        }
We use that method later on for stopping the talker.

Here is your methods for button1

Code:
        private void button1_Click(object sender, EventArgs e)
        {
            timer1.Interval = 1000;
            SendKeys.Send("%{TAB}");
            timer1.Enabled = true;
        }

Timer methods

Code:
        private void timer1_Tick(object sender, EventArgs e)
        {
            Random randomnum = new Random();
            timer1.Enabled = false;
            timer1.Interval = randomnum.Next(125, 225);
            if (count < textBox1.Text.Length)
            {
                SendKeys.Send(textBox1.Text);
                SendKeys.Send("{Enter}");
                timer1.Enabled = true;
            }
            else
            {
                count = 0;
                SendKeys.Send("{Enter}");

            }
        }

For button2, your stop button, your process is what you named it, mine was talker so I end the process talker.

Code:
        private void button2_Click(object sender, EventArgs e)
        {
            stopProcess("Talker");
            timer1.Enabled = false;
        }

I haven't added a frequency to it, but if you wanted, the code would be something like -

Code:
            timer1.Interval = Convert.ToInt32(textBox2.Text);


Note - I don't take all credits for this.
 
Valentine's Singing Competition Winner
Sythe Awards 2015 Winner
Sythe Awards 2016 Winner
Sythe Awards 2020 Winner
Member of the Month Winner
MushyMuncher
Gohan has AIDS
Extreme Homosex
World War 3
I'm LAAAAAAAME
Discord Verified
Off Topic Participant
lol sendkeys
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
^I'l infract you for spamming sir!
 
duelarena.gg
Back
Top