[Source] Record and Play Mouse Moviment C#
Página 1 de 1
[Source] Record and Play Mouse Moviment C#
- Código:
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.Runtime.InteropServices;
namespace SimularMouse_Wget_
{
public partial class FrmPrincipal : Form
{
public FrmPrincipal()
{
InitializeComponent();
}
[DllImport("user32.dll")]
static extern bool SetCursorPos(int X, int Y);
public bool grav = false;
public bool rep = false;
public int Index;
public int Findindex;
public int[] x = new int[10000000];
public int[] y = new int[10000000];
private void SimulaTimer_Tick(object sender, EventArgs e)
{
lb_MouseX.Text = "Mouse X: " + Convert.ToString(Cursor.Position.X);
lb_MouseY.Text = "Mouse Y: " + Convert.ToString(Cursor.Position.Y);
if (grav == true)
{
Index = Index + 1;
x[Index] = Cursor.Position.X;
y[Index] = Cursor.Position.Y;
lb_Movimentos.Text = "Movimentos: " + Index;
if (Index == 10000000)
{
grav = false;
btn_Grav.Text = "Gravar";
}
}
if (rep == true)
{
Index = Index + 1;
SetCursorPos(x[Index], y[Index]);
lb_Movimentos.Text = "Movimentos: " + Index + " / " + Findindex;
if (Index == Findindex)
{
rep = false;
btn_Rep.Text = "Reproduzir";
}
}
}
private void btn_Grav_Click(object sender, EventArgs e)
{
if (grav == true)
{
Findindex = Index;
Index = Findindex;
grav = false;
lb_Movimentos.Text = "Movimentos: " + Index + " / " + Findindex;
btn_Grav.Text = "Gravar";
}
else
{
Index = 1;
lb_Movimentos.Text = "Movimentos: " + Index + " / " + Findindex;
grav = true;
btn_Grav.Text = "Parar";
}
}
private void btn_Rep_Click(object sender, EventArgs e)
{
if (rep == true)
{
rep = false;
btn_Rep.Text = "Reproduzir";
}
else
{
Findindex = Index;
Index = 1;
rep = true;
btn_Rep.Text = "Parar";
}
}
private void FrmPrincipal_Load(object sender, EventArgs e)
{
this.Maxim****ox = false;
}
}
}
Crédit: Wget
uNreal- ADM
Tópicos semelhantes
» [Source] ThePerfectInjector
» [Source] TriggerBot C++ & C#
» [Source] Open Form in Dll C#
» [C#] Run Process with CreateProcess Source
» [Source] InjectDllViaAPC - Delphi
» [Source] TriggerBot C++ & C#
» [Source] Open Form in Dll C#
» [C#] Run Process with CreateProcess Source
» [Source] InjectDllViaAPC - Delphi
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos