Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Takari's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Cross Fire Section
    Posts
    11,889
    Reputation
    574
    Thanks
    1,968
    My Mood
    Cool

    [TUT]How to make a simple[Closed]

    Well this is my first Tutorial so please give me some comments about this.

    What we will do in this tutorial?
    • A simple Auto Clicker.
      Hotkeys.
      Interval
      & more!


    I will split this tutorial in 3 parts.1 part is for the button,2 part is for the GUI and things like that and 3 part is for coding.

    First Part:

    First,Open Microsoft Visual Basic 2008 Express Edition.
    When it open press Ctrl+N.
    Choose Windows Forms Applications and name it Simple Auto Clicker,and click OK.
    You will need 3 Labels.
    The label1 text should be F5 = Start
    The label2 text should be F6 = Stop
    The label3 text should be Speed of the clicks.

    Than you will need 1 Textbox.
    This should be under Speed of the clicks or beside it.

    Than you will need 2 Timers.
    Change Timer1 name to Hotkeys.
    Enable do it False.
    And Interval do it 1.

    Change Timer2 name to Clicks.
    Than just change Interval do 1000.

    Part 2:
    Click on Form1.
    And go on Properties.
    Change Maximize Box,Minimize Box and Show Icon to False.
    Than change TopMost to True.
    Don't do the background(GUI)so big do it like 300 , 150.

    Part 3:
    So this will be the coding.
    Double Click On Form1 and Delete Everything in there.

    Than copy and paste this code:
    Code:
    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
    Press F5 and it should start Debugging.
    Than Save it.

    Credits:
    VBFX~For the code.
    Me~for other things.
    That's all.
    If you find any problems please comment.
    Last edited by Takari; 03-31-2010 at 10:03 AM.




     
    Goal:
    10,000 Posts - 10/13/2011
    Become Minion - Not Done
    Become Donator - 07/29/2011
    1000 Thanks - Done - 07/25/2011
    2000 Thanks - Not Done
    Thanks Archangel for my 1,000 Thanks.
    Thanks Keroaplt for my Signature.

  2. The Following 4 Users Say Thank You to Takari For This Useful Post:

    Golden. (06-12-2010),House (07-28-2010),karam98 (03-26-2011),Tony Stark` (02-17-2011)

  3. #2
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,971
    My Mood
    Happy
    Give credits on the autoclicker part.

    Other, good job

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

    NextGen1 (03-31-2010)

  5. #3
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by hejsan View Post
    Give credits on the autoclicker part.

    Other, good job
    Ditto......


     


     


     



    The Most complete application MPGH will ever offer - 68%




  6. #4
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,971
    My Mood
    Happy
    Quote Originally Posted by NextGen1 View Post


    Ditto......
    Maybe this?

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

    NextGen1 (03-31-2010)

  8. #5
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,109
    looks quite similar to the youtube video hu xD

    give credits >_<



  9. #6
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Agreed, USer is online, I will send him a VM


     


     


     



    The Most complete application MPGH will ever offer - 68%




  10. #7
    Takari's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Cross Fire Section
    Posts
    11,889
    Reputation
    574
    Thanks
    1,968
    My Mood
    Cool
    Yes,it's that video.
    Sorry I will edit it with credits.




     
    Goal:
    10,000 Posts - 10/13/2011
    Become Minion - Not Done
    Become Donator - 07/29/2011
    1000 Thanks - Done - 07/25/2011
    2000 Thanks - Not Done
    Thanks Archangel for my 1,000 Thanks.
    Thanks Keroaplt for my Signature.

  11. The Following User Says Thank You to Takari For This Useful Post:

    NextGen1 (03-31-2010)

  12. #8
    Shark23's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Kansas
    Posts
    424
    Reputation
    10
    Thanks
    57
    My Mood
    Cool
    Hmmm. It's not bad of a tutorial. You could have explained each block of code or at least done some commenting in the code itself for people new to VB. Example using this code:
    Code:
    Public Class Form1
        'Get keystate for hotkeys
        Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
        'Get envent for clicking
        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 Hotkeys.Tick
            'Declare 'start' hotkey
            Dim Hotkey1 As Boolean
            'Define 'start' hotkey as F5
            Hotkey1 = GetAsyncKeyState(Keys.F5)
            'If 'start' hotkey is pressed, start the clicks
            If Hotkey1 = True Then
                Clicks.Start()
            End If
    
            'Declare 'stop' hotkey
            Dim Hotkey2 As Boolean
            'Define 'stop' hotkey
            Hotkey2 = GetAsyncKeyState(Keys.F6)
            'If 'stop' hotkey is pressed, stop clicking
            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
            'Set interval(speed) of clicks to the number in the textbox
            Clicks.Interval = TextBox1.Text
            'Click the mouse
            mouse_event(mouseclickdown, 0, 0, 0, 0)
            mouse_event(mouseclickup, 0, 0, 0, 0)
        End Sub
    End Class
    Assembly Programmer

  13. The Following User Says Thank You to Shark23 For This Useful Post:

    ubanooba (04-22-2010)

  14. #9
    Takari's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Cross Fire Section
    Posts
    11,889
    Reputation
    574
    Thanks
    1,968
    My Mood
    Cool
    Quote Originally Posted by Shark23 View Post
    Hmmm. It's not bad of a tutorial. You could have explained each block of code or at least done some commenting in the code itself for people new to VB. Example using this code:
    Code:
    Public Class Form1
        'Get keystate for hotkeys
        Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
        'Get envent for clicking
        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 Hotkeys.Tick
            'Declare 'start' hotkey
            Dim Hotkey1 As Boolean
            'Define 'start' hotkey as F5
            Hotkey1 = GetAsyncKeyState(Keys.F5)
            'If 'start' hotkey is pressed, start the clicks
            If Hotkey1 = True Then
                Clicks.Start()
            End If
    
            'Declare 'stop' hotkey
            Dim Hotkey2 As Boolean
            'Define 'stop' hotkey
            Hotkey2 = GetAsyncKeyState(Keys.F6)
            'If 'stop' hotkey is pressed, stop clicking
            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
            'Set interval(speed) of clicks to the number in the textbox
            Clicks.Interval = TextBox1.Text
            'Click the mouse
            mouse_event(mouseclickdown, 0, 0, 0, 0)
            mouse_event(mouseclickup, 0, 0, 0, 0)
        End Sub
    End Class
    That's like the code of the Auto Clicker I posted and what you mean?




     
    Goal:
    10,000 Posts - 10/13/2011
    Become Minion - Not Done
    Become Donator - 07/29/2011
    1000 Thanks - Done - 07/25/2011
    2000 Thanks - Not Done
    Thanks Archangel for my 1,000 Thanks.
    Thanks Keroaplt for my Signature.

  15. #10
    Shark23's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Kansas
    Posts
    424
    Reputation
    10
    Thanks
    57
    My Mood
    Cool
    Mine has comments on it. Yours isn't commented or anything to help out new users understand what they are doing.
    Assembly Programmer

  16. The Following User Says Thank You to Shark23 For This Useful Post:

    Alroundeath (04-22-2010)

  17. #11
    dylan40's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    In ya head yo. oya.
    Posts
    851
    Reputation
    11
    Thanks
    136
    My Mood
    Happy
    gj but leacher !!! ^^

  18. #12
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    GJ, nice and simple TUT. Its not leeching if its a tutorial really, just sharing it around

  19. #13
    trevor206's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    324
    Reputation
    12
    Thanks
    107
    Quote Originally Posted by Shark23 View Post
    Mine has comments on it. Yours isn't commented or anything to help out new users understand what they are doing.
    wow if i was to post code now in this section i would NOT put comments it because most noobs are just going to copy paste it(which i do in some cases), and delete code from it that obviously they can fix b4 they can use my code so the comments are 1/4 useless(unless its a hard code to understand)(please note that was my opinion don't start to flame me ).

  20. #14
    aLcohoL_95's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    SatyRicon
    Posts
    685
    Reputation
    8
    Thanks
    291
    My Mood
    Cynical
    nice job

    CANNIBAL CORPSE P0WNS


  21. #15
    ubanooba's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    35
    Reputation
    10
    Thanks
    1
    My Mood
    Confused
    Sorry if this is reviving a dead topic but I copied the code you provided, it built fine but i started debugging and got these 3 errors:

    A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll <--- this was repeated twice

    A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll <---- also repeated twice

    A first chance exception of type 'System.EntryPointNotFoundException' occurred in WindowsApplication1.exe

    I'm using Microsoft Visual Basic 2008 Express Edition on Windows Vista-64bit if that helps.

    Thanks

Page 1 of 2 12 LastLast

Similar Threads

  1. [TUT]How to make a simple Auto Clicker!
    By Takari in forum Programming Tutorials
    Replies: 24
    Last Post: 09-20-2010, 07:28 PM
  2. [TUT]How to make a Simple Spammer!
    By DeathHunter in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 30
    Last Post: 05-02-2010, 06:43 AM
  3. [TUT]How to make a Simple Auto Clicker!
    By DeathHunter in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 22
    Last Post: 04-15-2010, 12:30 PM
  4. [TUT]How to make a Simple Progress Bar!
    By DeathHunter in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 4
    Last Post: 04-12-2010, 12:02 AM
  5. *Tut* How To Make A Simple Notepad
    By u1111u in forum Programming Tutorials
    Replies: 2
    Last Post: 01-31-2010, 11:58 PM