I've always enjoyed naughty stuff like this; it's useful to me in most cases because I set my timer up on a 10 second interval, that way when I tell people in chat's that I'll be right back, it sends that message every 10 seconds (so not to annoy them) until I get back and press stop. :D
private void Spam(String messageToSpam)
{
// Using the SendKeys class (located in System.Windows.Forms) we will send our string.
SendKeys.Send(messageToSpam);
// Using the same class we will send the enter key as a string.
SendKeys.Send("{ENTER}");
}
Now just set up a timer and create a timer tick event; call the Spam method using whatever string you're going to spam and done. :D
private void timer1_Tick(object sender, EventArgs e)
{
// Send whatever the user types into the textbox.
Spam(textBox1.Text);
}
I've made quite a few methods related to this that I won't be releasing, but can give you the DLL I've created that contains the chat methods I've been working on. :)