Saturday, 7 January 2012

[SOURCE]Auto-Clicker





Public Class Form1
    Private Declare Function key Lib "User32" Alias "GetAsyncKeyState" (ByVal Key As Keys) As Keys
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
    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 Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        mouse_event(mouseclickdown, 0, 0, 0, 0)
        mouse_event(mouseclickup, 0, 0, 0, 0)
    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.S)
        If hotkey = True Then
            Timer1.Enabled = True
            Timer1.Start()
        End If
        Dim hotkey2 As Boolean
        hotkey2 = GetAsyncKeyState(Keys.A)
        If hotkey2 = True Then
            Timer1.Stop()
            Timer1.Enabled = False
        End If

    End Sub

0 Responses to “[SOURCE]Auto-Clicker”

Post a Comment

All Rights Reserved Mbojo-Lab | Blogger Template by Bloggermint