Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[Tutorial] How to make a Click Bot (N00b friendly)

Hey HackForums! Today I got a simple tutorial on how to make a easy Click Bot in Visual Studio.

What you will need:
*Visual Studio 2012+
*A little knowledge in visual basic

That's about it :D I will provide the code and all the steps :)



Step 1: You need to download and install Visual Studio onto your computer, Here is the link to the official website.
>>> https://www.visualstudio.com/en-us/visua...ge-vs.aspx


Step 2: After installing and opening Visual Studio select File>New>Project
Should look something like this:

[Image: zDGzpXB.png]

Step 3: Make sure that Visual basic is selected and make sure that Windows Forms Application is selected as well.
Then name your project however you please.

Should look like this:

[Image: WbwbVyT.png]

Click Ok

Step 4: Now when the page loads you want to drag 3 buttons, a label, a timer and a trackbar onto the form.

You can get all of these on the left side bar as shown bellow:

[Image: TMrTmND.png]

Step 5: Now rename the buttons by clicking on a button and going to the bottom right hand side, scrolling through the different button properties and changing the box the says "text".

Should look like:

[Image: EzvxZw2.png]

Change button1 to "Start"
Change button2 to "Stop"
Change button3 to "Test"
Change label1 to "0"
Lastly change the trackbar min value to 1 and max to 100

So what we want the program to do is when we click button1 or "Start" the auto clicker will start at whatever rate our slider is on. When we click button2 or "Stop" we want the program to stop the auto clicking, and lastly we want when we click the "Test" button the label will show the number of times it was clicked.

Step 6: So now that we got all that set up lets jump into the code! Double click the "Start" button and lets start the timer and set so the speed of the timer depends on the trackbar. So to start the timer we will type
Code
Timer1.Start
to set the speed we will do
Code
Timer1.Interval = TrackBar1.Value

overall the code for Button1 should look as follows:
[Image: OcqXq2L.png]


Step 7: Before I get too ahead we need to define some variables at the top of the code. Right underneath Public
Class Form1 copy and past the following:
Code
Declare Sub mouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32)
All this does is declares the mouse event that we will be using to make the clicks.

For the next variable we need to define mouseclickup and mouseclickdown these could be called anything but I am using mouseclickup/down just for simplicity.
Underneath the mouse_event we just created write:
Code
Private mouseclickup = 4

and for the mouseclickdown we will put

Code
Private mouseclickdown = 2

The last thing bit of code we need to define is a integer which will be used to measure the number of times the test button is clicked.
To do this simply type
Code
Dim Test As Integer
we are just defining "Test" as a new integer.

All the code for the top definitions should look like:
[Image: DNaoMge.png]

Step 8: Now go back to the design screen and double click the "Stop" button, we will put one simple line of code here that will stop the timer.
Simply put:
Code
Timer1.Stop()
this stops the timer.


Step 9: Go back to the design screen again and this time double click on the "Test" button, here we will make the button add 1 to the score every time its clicked.
To do this we will type:
Code
Test = Test + 1
This line says that the integer we created "Test" is going to equal itself plus one. So every time the buttons clicked the integer will go up by one.
Next we will make the label display the integer "Test" every time the button is clicked.
The code for that is:

Code
Label1.Text = Test

simple isn't it?

All the code for button3 should end up looking like this:
[Image: ks9lllc.png]

Step 10: For the last chunk of code we will be writing the actual script that makes the mouse auto click.
To start off go back to the design screen and at the bottom you should see a small box that says timer1 at the bottom of the screen:
[Image: Bfd8NKo.png]

double click that and it will bring you to its code. What we will be doing here is writing the code for every time the timer ticks which will then execute. We need to set the cursors position and drawing point first so type:
Code
Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position)

Next we will set the 'mouse_event' that we declared in the beginning to mouseclickdown and to mouseclickup.
To do this for mouseclickdown type:

Code
mouse_event(mouseclickdown, 0, 0, 0, 1)

and for mouseclickup we would do
Code
mouse_event(mouseclickup, 0, 0, 0, 1)

That code should look like this

[Image: hVJ8ddp.png]


Congrats! You finished writing all the code! 🤗
Here is a picture of what all the code should look like if you are having any troubles:

[Image: NX0P1wY.png]



The last thing that you would want to do is just make the design look more fancy or user friendly, however you like it :)

Just click the green "play" looking button at the top of the screen to run your auto clicker!

If anyone would like the source code here is a direct link> 🎉


Thanks for reading! I hope you benifited from my tutorial, took a while to write! 😝

If you have any questions, concerns please feel free to ask either bellow or in pm.


Have fun and stay safe!
-NinjaLeaks
<3
nice tutorial thank you sir
(Feb 19, 2016 07:41 AM)Shadow.C0d3r Wrote:  nice tutorial thank you sir

no problem! glad you benefited!
<3
awesome tutorial thank you, stay blessed!
(Feb 22, 2016 12:40 PM)dafr34k Wrote:  awesome tutorial thank you, stay blessed!

Happy that you liked it! Let me know if you have any questions :D
<3
Nice tutorial, will try this out tomorrow :)
Really well done tutorial I will try it later. Thanks so much for all of this
Great tutorial!

Definately going to try this in a bit :)
(Mar 13, 2016 11:05 AM)FreeAnneFrank Wrote:  Nice tutorial, will try this out tomorrow :)

Thanks glad you liked it!

(Mar 14, 2016 11:22 PM)G_LO Wrote:  Really well done tutorial I will try it later. Thanks so much for all of this

No problem! Happy to be of a assistance. 🤝

(Mar 14, 2016 11:42 PM)Cʜᴀᴏs Wrote:  Great tutorial!

Definately going to try this in a bit :)

Thanks m8!
🎉
<3
Thank's, i'm going to build it tonight
(Mar 23, 2016 07:00 AM)Pekls Wrote:  Thank's, i'm going to build it tonight

You welcome! Good luck! 🤝
<3


Possibly Related Threads...
Thread / Author Replies Views Last Post
by iLoveGamingAug 26, 2026 04:44 PM 6 986 Aug 26, 2026 04:44 PM
Last Post: delta zer0
by WICK1Jul 6, 2020 10:25 PM 1 367 Jul 6, 2020 10:25 PM
Last Post: frank3nstien
by DiаmondJun 6, 2017 11:44 AM 59 6,462 Jun 6, 2017 11:44 AM
Last Post: brizy007