Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Blubb1337 View Post
    The constants are always the same nub!
    Not the naming of the constants, nub.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  2. #17
    Maniac101's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    USA
    Posts
    299
    Reputation
    11
    Thanks
    217
    My Mood
    Twisted
    ok so i think i over thought something or im missing something small here i want this to activate on the mousedown and deactivate on mouseup after the button is clicked
    so it would be like this
    1Click button
    2press and hold mouse to active
    3depress mouse to deactivate

    heres my code im trying any ideas

    [php]Public Class Form1

    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16

    Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cbuttons As Int32, ByVal dwExtraInfo As Int32)
    Private Const LButtonDown = &H2
    Private Const LButtonUp = &H4

    Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
    Do Until Timer1.Enabled = False
    mouse_event(LButtonDown, 0, 0, 0, 0)
    mouse_event(LButtonUp, 0, 0, 0, 0)
    Loop
    End Sub


    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    If GetAsyncKeyState(LButtonDown) = True Then
    Timer1.Enabled = True
    Else
    Timer1.Enabled = False
    End If
    End Sub
    End Class[/php]

    i had it working but as soon as you pressed the button it spammed mouse click (like it should when the mouse button is held down) and yea i have this annoying error beep going on now i just muted it lol dont feel like restarting
    Last edited by Maniac101; 09-12-2010 at 07:14 PM.
    Add Me on MSN Maniac101@live.com
    [IMG]https://i820.photobucke*****m/albums/zz121/lilmatt1101/maniac101r.png[/IMG]

    [img]https://www.danasof*****m/sig/Maniac288377.jpg[/img]

  3. #18
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Maniac101 View Post
    ok so i think i over thought something or im missing something small here i want this to activate on the mousedown and deactivate on mouseup after the button is clicked
    so it would be like this
    1Click button
    2press and hold mouse to active
    3depress mouse to deactivate

    heres my code im trying any ideas

    [php]Public Class Form1

    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16

    Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cbuttons As Int32, ByVal dwExtraInfo As Int32)
    Private Const LButtonDown = &H2
    Private Const LButtonUp = &H4

    Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
    Do Until Timer1.Enabled = False
    mouse_event(LButtonDown, 0, 0, 0, 0)
    mouse_event(LButtonUp, 0, 0, 0, 0)
    Loop
    End Sub


    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    If GetAsyncKeyState(LButtonDown) = True Then
    Timer1.Enabled = True
    Else
    Timer1.Enabled = False
    End If
    End Sub
    End Class[/php]

    i had it working but as soon as you pressed the button it spammed mouse click (like it should when the mouse button is held down) and yea i have this annoying error beep going on now i just muted it lol dont feel like restarting
    Okay, first of all your logic for the timer is all wrong. You can't use a timer_tick event if the timer is disabled. Why not just use simple hotkeys like so:

    [php]
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    If GetAsyncKeyState(Keys.F10) Then
    Call DoClick '//call the click sub.
    Timer1.Stop() '//stop the timer until you've stopped clicking.
    End if

    End Sub


    Private Sub DoClick()

    Do Until GetAsyncKeyState(Keys.F10)
    mouse_event(LbuttonDown, 0, 0, 0, 0)
    mouse_event(LbuttonDown, 0, 0, 0, 0)
    Loop

    End Sub
    [/php]

    That way it won't start clicking until you press F10 and won't stop 'til it's pressed again.

    Timer1.Start() '//upon exiting the loop you'll reach this line and start the hotkey timer up again.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  4. The Following User Says Thank You to Jason For This Useful Post:

    Maniac101 (09-14-2010)

  5. #19
    Maniac101's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    USA
    Posts
    299
    Reputation
    11
    Thanks
    217
    My Mood
    Twisted
    ok thanks to some help from j-Deezy i got it working on a hot key now from here is there a way to make LButton aka left mouse button the hot key ie.. down = on up= off
    so that when you press and hold lbutton down it turns the auto clicker on and when you release it it shuts off?

    thanks again

    heres what i have now
    [php]Public Class Form1

    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16

    Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cbuttons As Int32, ByVal dwExtraInfo As Int32)
    Private Const LButtonDown = &H2
    Private Const LButtonUp = &H4

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    If GetAsyncKeyState(Keys.Add) Then
    Threading.Thread.Sleep(100)
    Call DoClick() '//call the click sub.
    Timer1.Stop() '//stop the timer until you've stopped clicking.
    End If


    End Sub


    Private Sub DoClick()

    Do Until GetAsyncKeyState(Keys.Subtract)
    mouse_event(LButtonDown, 0, 0, 0, 0)
    mouse_event(LButtonUp, 0, 0, 0, 0)
    Loop
    Timer1.Start()
    End Sub

    End Class[/php]
    Last edited by Maniac101; 09-14-2010 at 10:13 PM.
    Add Me on MSN Maniac101@live.com
    [IMG]https://i820.photobucke*****m/albums/zz121/lilmatt1101/maniac101r.png[/IMG]

    [img]https://www.danasof*****m/sig/Maniac288377.jpg[/img]

  6. #20
    Imported's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    142
    Reputation
    27
    Thanks
    47
    My Mood
    Relaxed
    Quote Originally Posted by Maniac101 View Post
    ok thanks to some help from j-Deezy i got it working on a hot key now from here is there a way to make LButton aka left mouse button the hot key ie.. down = on up= off
    so that when you press and hold lbutton down it turns the auto clicker on and when you release it it shuts off?

    thanks again

    heres what i have now
    [php]Public Class Form1

    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16

    Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cbuttons As Int32, ByVal dwExtraInfo As Int32)
    Private Const LButtonDown = &H2
    Private Const LButtonUp = &H4

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

    If GetAsyncKeyState(Keys.Add) Then
    Threading.Thread.Sleep(100)
    Call DoClick() '//call the click sub.
    Timer1.Stop() '//stop the timer until you've stopped clicking.
    End If


    End Sub


    Private Sub DoClick()

    Do Until GetAsyncKeyState(Keys.Subtract)
    mouse_event(LButtonDown, 0, 0, 0, 0)
    mouse_event(LButtonUp, 0, 0, 0, 0)
    Loop
    Timer1.Start()
    End Sub

    End Class[/php]
    hehe sorry it was my fault ther error was there to begin with . Accidently wrote mouse_event(LbuttonDown, 0, 0, 0, 0) twice instead of mouse_event(LButtonUp, 0, 0, 0 ,0) for one of them /
    TROLOLOLOLO


  7. The Following User Says Thank You to Imported For This Useful Post:

    Maniac101 (09-14-2010)

  8. #21
    Maniac101's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    USA
    Posts
    299
    Reputation
    11
    Thanks
    217
    My Mood
    Twisted
    yea its cool should have seen it myself read over ti thousands of times and just over looked it
    Add Me on MSN Maniac101@live.com
    [IMG]https://i820.photobucke*****m/albums/zz121/lilmatt1101/maniac101r.png[/IMG]

    [img]https://www.danasof*****m/sig/Maniac288377.jpg[/img]

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Help]Change Button Text[Solved]
    By [PA]nts in forum Visual Basic Programming
    Replies: 7
    Last Post: 06-29-2010, 02:48 PM
  2. [Help] Binding button to textbox
    By Archangel in forum Visual Basic Programming
    Replies: 2
    Last Post: 05-10-2010, 08:30 AM
  3. [Help]Record Button Down Length
    By ppl2pass in forum Visual Basic Programming
    Replies: 10
    Last Post: 05-02-2010, 07:46 AM
  4. [Help]Mouse Position coordinates
    By Unkn0wn_h4cker in forum Visual Basic Programming
    Replies: 9
    Last Post: 03-12-2010, 01:29 PM
  5. [Help] Mouse Hotkeys
    By ilovepie21 in forum Visual Basic Programming
    Replies: 1
    Last Post: 03-09-2008, 06:22 AM