Hey guys I'm working on a program and I need to find how to make auto clicker as one of its features I've searched google for a long time to no avail. Does anyone know how to do this?
5 replies to this topic
#1
Posted 12 July 2010 - 08:04 PM
|
|
|
#2
Posted 12 July 2010 - 09:58 PM
I need to make it so Thread.Sleep(); takes a variable here is my form1.cs
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;
using System.Threading;
namespace AutoTyper
{
public partial class Form1 : Form
{
private bool canWork = false;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form Form1 = new Form4();
Form1.Show();
}
private void textBox2_KeyPress(object sender, KeyPressEventArgs e)
{
char ch = e.KeyChar;
if (!char.IsDigit(ch) && ch != 8)
{
e.Handled = true;
}
}
private void StartTyping(object obj)
{
string message = obj.ToString();//Retreives the message
string ch = textBox2.Text;
Thread.Sleep(400);
while (canWork)
{
SendKeys.SendWait(message); //Send the message.
SendKeys.SendWait("{ENTER}"); //Send the enter key.
Thread.Sleep(ch); //Wait 1000 milliseconds -> 1 seconds.
}
}
private void supportUsToolStripMenuItem_Click(object sender, EventArgs e)
{
Form Form2 = new Form2();
Form2.Show();
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
Form Form2 = new Form2();
Form2.Show();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void autoClickerToolStripMenuItem_Click(object sender, EventArgs e)
{
Form Form3 = new Form3();
Form3.Show();
}
private void button1_Click_1(object sender, EventArgs e)
{
if (button1.Text == "Start")
{
canWork = true;
button1.Text = "Stop";
Thread thread = new Thread(StartTyping); //Create a new thread
thread.Start(textBox1.Text);
}
else
{
canWork = false;
button1.Text = "Start";
}
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
Form AboutBox1 = new AboutBox1();
AboutBox1.Show();
}
private void supportUsToolStripMenuItem_Click_1(object sender, EventArgs e)
{
Form Form2 = new Form2();
Form2.Show();
}
private void startingScreenToolStripMenuItem_Click(object sender, EventArgs e)
{
Form Form4 = new Form4();
Form4.Show();
}
private void autoClickerToolStripMenuItem_Click_1(object sender, EventArgs e)
{
Form Form3 = new Form3();
Form3.Show();
}
private void openToolStripMenuItem_Click_1(object sender, EventArgs e)
{
Form Form3 = new Form3();
Form3.Show();
}
}
}
#3
Posted 13 July 2010 - 01:17 AM
You'll probbaly have to parse to Integer if this isn't working:
Thread.Sleep(ch);
int sleep = int.Parse(ch);
Thread.Sleep(sleep);
Thread.Sleep(ch);
int sleep = int.Parse(ch);
Thread.Sleep(sleep);
#4
Posted 13 July 2010 - 10:21 AM
thanks i got that working anyone have help for the auto clicker?
#5
Posted 13 July 2010 - 12:40 PM
I think mouseclicks are send using SendInput. And moving the mouse is probably done using Cursor.Position = new Point(x,y);
I don't know how the SendInput really works, i guess google will be your friend.
I don't know how the SendInput really works, i guess google will be your friend.
#6
Posted 13 July 2010 - 05:00 PM
Cant find much on google about it hm I have a c++ but not c# so I know its possible I'll go look into it moire.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









