A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[Visual C#] Spammer

1.3k views · started by Chad ·
#1
[Visual C#] Spammer
Got bored really fast and wanted to mess with Visual C#.

What you need
-------------
Timer (tmrSpammer)
2 Buttons (cmdStop, cmdStart)
1 TextBox (txtMessage)
3 Radio Buttons (optFast, optNormal, optSlow)


        private void cmdStart_Click(object sender, EventArgs e)
{
tmrSpammer.Enabled = true;
}

private void tmrSpammer_Tick(object sender, EventArgs e)
{
if (optFast.Checked == true)
{
tmrSpammer.Interval = 20;
}
if (optNormal.Checked == true)
{
tmrSpammer.Interval = 3500;
}
if (optSlow.Checked == true)
{
tmrSpammer.Interval = 15000;
}

SendKeys.Send(txtMessage.Text);
SendKeys.Send("{Enter}");
}

private void cmdStop_Click(object sender, EventArgs e)
{
tmrSpammer.Enabled = false;
}


Full project code.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Spammer
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}

private void cmdStart_Click(object sender, EventArgs e)
{
tmrSpammer.Enabled = true;
}

private void tmrSpammer_Tick(object sender, EventArgs e)
{
if (optFast.Checked == true)
{
tmrSpammer.Interval = 20;
}
if (optNormal.Checked == true)
{
tmrSpammer.Interval = 3500;
}
if (optSlow.Checked == true)
{
tmrSpammer.Interval = 15000;
}

SendKeys.Send(txtMessage.Text);
SendKeys.Send("{Enter}");
}

private void cmdStop_Click(object sender, EventArgs e)
{
tmrSpammer.Enabled = false;
}
}
}
#2
Very old, but good for beginners.
Thanks, I lost all my codes too.