locked
can somone merge this? RRS feed

  • Question

  • I was told to post here, I thought it was vb and heres my issue,....

    My friend made me a program thats basically an autoclicker with f5, f6start  stop, and a sleep timer, And I asked for a rapid clicker, that only repeats mouse clicks when the mouse button is pressed , I made the program I want in autohotkey script, it worked,but It will not perform on the platform I need it on, his does, so now on to my question.,

    Can someone remove/change the part that makes it autofire, to loop clicks on the press of the left mouse button...keep everything else, boxes timers, etc. Heres the code I made, then the code he wrote, thanks in advance

    $Lbutton::
    Loop
    {
    Sleep, 10 ; adjust delay by changing this value.
    ; approximately 10 is the minimum to be used to
    ; reliably detect change button release

    GetKeyState, state, Lbutton, P
    if state = U ; The key has been released, so break out of the loop.
    break

    ; tested by sending a character
    ; send z
    Click

    }
    return

    Public Class Form1
    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 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 Hotkeys.Tick
    Dim Hotkey1 As Boolean
    Hotkey1 = GetAsyncKeyState(Keys.F5)
    If Hotkey1 = True Then
    Clicks.Start()

    End If
    Dim Hotkey2 As Boolean
    Hotkey2 = GetAsyncKeyState(Keys.F6)
    If Hotkey2 = True Then
    Clicks.Stop()

    End If
    End Sub

    Private Sub Click_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Clicks.Tick
    Clicks.Interval = TextBox1.Text
    mouse_event(mouseclickdown, 0, 0, 0, 0)
    mouse_event(mouseclickup, 0, 0, 0, 0)
    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

    End Sub
    Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click

    End Sub
    End Class
    • Moved by Harry Zhu Tuesday, April 13, 2010 3:18 AM (From:Visual C# Express Edition)
    Saturday, April 10, 2010 7:15 PM

Answers

All replies