Me enseñan códigos para autoclicks?

Iniciado por tigg3r, 16 Marzo 2013, 06:51 AM

0 Miembros y 1 Visitante están viendo este tema.

tigg3r

Me dijieron que hay varios códigos para autoclicks y que son mucho más rapidos de los que yo utilizo.
"mouse_event(mouseclickdown, 0, 0, 0, 0)
        mouse_event(mouseclickup, 0, 0, 0, 0)"

¿Cuales son? ¿Se pueden crear propios códigos?
Es que soy muy nuevo en esto...

Gracias.

WIитX

Aquí tienes un simple código de un Autoclick

Public Class Form1
    Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwExtraInfo As Long)
    Private Const mouseclickup = 4
    Private Const mouseclickdown = 2
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Windows.Forms.Cursor.Position = New Point(Windows.Forms.Cursor.Position.X, Windows.Forms.Cursor.Position.Y)
        Timer1.Interval = NumericUpDown1.Value
        Label1.Text = Windows.Forms.Cursor.Position.X
        Label2.Text = Windows.Forms.Cursor.Position.Y

        Windows.Forms.Cursor.Position = New Point(TextBox1.Text, TextBox2.Text)

        mouse_event(mouseclickdown, 3, 7, 1, 2)
        mouse_event(mouseclickup, 2, 5, 9, 3)
        mouse_event(mouseclickdown, 3, 7, 1, 2)
        mouse_event(mouseclickup, 2, 5, 9, 3)

        Windows.Forms.Cursor.Position = New Point(Label1.Text, Label2.Text)
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        Dim hotkey As Boolean
        hotkey = GetAsyncKeyState(Keys.F1)
        If hotkey = True Then Timer1.Start()
        Dim hotkey1 As Boolean
        hotkey1 = GetAsyncKeyState(Keys.F2)
        If hotkey1 = True Then Timer1.Stop()
    End Sub

    Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
        Dim Posicion As Boolean
        Posicion = GetAsyncKeyState(Keys.F3)
        If Posicion = True Then
            TextBox1.Text = MousePosition.X : TextBox2.Text = MousePosition.Y
        End If
        If Posicion = False Then
        End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

    End Sub
End Class
"Es más divertido hacerse pirata que unirse a la marina." (Steve Jobs)