OK this is not exactly an auto clicker but I didn't know what to call it.
What I want to do is choose a colour for example red, and every time that colours shows on your screen the mouse quickly moves to that colour and clicks on it.
I think this is basically an aimbot, I am really need to learn how to do this, and to be honest I don't have a clue where to start, so I will be needing help with everything, I hope I can get some help from you guys.
Thank you very much,
-SoldierFront
yaay im the first haha i owned you blub! 1.learn some VB 2. this is not aimbot only program that presses mouse 3. when you'll learn it there you go 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 Hotkeys_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
Timer1.Start()
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey2 = True Then
Timer1.Stop()
End If
End If
End Sub
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
End Class
OK this is not exactly an auto clicker but I didn't know what to call it.
What I want to do is choose a colour for example red, and every time that colours shows on your screen the mouse quickly moves to that colour and clicks on it.
I think this is basically an aimbot, I am really need to learn how to do this, and to be honest I don't have a clue where to start, so I will be needing help with everything, I hope I can get some help from you guys.
Thank you very much,
-SoldierFront
idk how to make it but its called a color aimbot.
Originally Posted by Major_the_hacker
yaay im the first haha i owned you blub! 1.learn some VB 2. this is not aimbot only program that presses mouse 3. when you'll learn it there you go 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 Hotkeys_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
Timer1.Start()
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey2 = True Then
Timer1.Stop()
End If
End If
End Sub
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
End Class
so all it does is click? I know only the basics, but yeah this will help me and I hope I can make my colour aimbot soon.
Thanks everyone for helping.
Originally Posted by Major_the_hacker
yaay im the first haha i owned you blub! 1.learn some VB 2. this is not aimbot only program that presses mouse 3. when you'll learn it there you go 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 Hotkeys_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
Timer1.Start()
Dim hotkey2 As Boolean
hotkey2 = GetAsyncKeyState(Keys.F6)
If hotkey2 = True Then
Timer1.Stop()
End If
End If
End Sub
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
End Class
You didn't own him, you just proved you can't read. The OP asked for how to get the mouse to move to a certain color and then click. A color aimbot. In short, you're a retard.
I know how to make it trigger a mouse click event when it goes over the color but I'm afraid I can't help you with making the mouse actually move to that color. Gimme a second to write the code out for the trigger on color.
Originally Posted by J-Deezy
You didn't own him, you just proved you can't read. The OP asked for how to get the mouse to move to a certain color and then click. A color aimbot. In short, you're a retard.
I know how to make it trigger a mouse click event when it goes over the color but I'm afraid I can't help you with making the mouse actually move to that color. Gimme a second to write the code out for the trigger on color.
Thank you very much.
And by the way, you better use
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16
-> x64 bit version.
It is working on x32 & x64 bit the other version is only working on x32 bit and causes bugs
Originally Posted by Blubb1337
And by the way, you better use
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16
-> x64 bit version.
It is working on x32 & x64 bit the other version is only working on x32 bit and causes bugs
aw ty dude aggain
Here we go:
Open Visual Basic.
Create new project.
On the Main form, add a picture box. Name it 'p'.
Set picture box location to 0,0 on the form.
Choose Auto-Size as mode for picture box.
Choose a colorful image for the picture box.
Now create a list box on one side of the picture box and name it 'L'.
Re size the list box so it is wide enough to show some text.
Create a new button and set its text to "Choose a color".
Create a new button and set its text to "Find Closes Colors".
Goto Code of the form and declare the following:
Dim clr As Color
Dim L2 as New Listbox
Public Declare Function SetCursorPos Lib "user32"( ByVal X As Integer , ByVal Y As Integer ) As Integer
Double click the first button that is "Choose a color". The code window will open. Add the following code for its click event.
Dim x As New ColorDialog
If Not x.ShowDialog = Windows.Forms.DialogResult.Cancel Then
clr = *****lor
End If
Now Double Click the 2nd button "Find Closest Colors". In its click event add the following code:
l .Items.Clear()
l2.Items.Clear()
Dim width As Integer = p .Image.Size.Width
Dim height As Integer = p .Image.Size.Height
Dim bitmp As New Bitmap( p .Image)
For x As Integer = 0 To width - 1
For y As Integer = 0 To height - 1
Dim pixelColor As Color = bitmp.GetPixel(x, y )
If pixelColor.R = clr.R And pixelColor.G = clr.G Then
l .Items.Add(pixelColor.ToString)
If x p .Location.X Or x p .Width Or y p .Location.Y Or y p .Height Then
MsgBox( "Out of co-ordinates.")
Continue For
End If
l2.Items.Add(x & ":" & y )
End If
Next
Next
Now double-click the list-box named "L" on the form. It's SelectedIndexChanged event will be shown in the code window. Add the following code in it:
Try
If Not l .SelectedItem Is Nothing Then
Dim sp() As String = l2.Items( l .SelectedIndex).ToString.Split( ":")
SetCursorPos(sp(0),sp(1))
End If
Catch ex As Exception
End Try
Optionally, add the following code to the picturebox's MouseClick event:
Dim pix As Color = DirectCast ( p .Image,Bitmap).GetPixel( e .X - 1, e .Y - 1)
MsgBox( "RED = " & pix.R & vbCrLf & "GREEN = " & pix.G & vbCrLf & "BLUE = " & pix.B)
Run the project. Click the button and choose a color that exists in the image too. Expand the dialog box for a wide variety of custom colors. Try to choose the closest color as possible. After choosing, press the 2nd button. If it will find the chosen colors in the image too, it will add them to the listbox. After the items have been added. Click the items in the listbox, and it will take the cursor directly to the color's location in the picturebox.
This is just a start, as I don't really know what exactly you are trying to do. So, we can move on from here.
Hope this helps.
Originally Posted by FLAMESABER
Here we go:
Open Visual Basic.
Create new project.
On the Main form, add a picture box. Name it 'p'.
Set picture box location to 0,0 on the form.
Choose Auto-Size as mode for picture box.
Choose a colorful image for the picture box.
Now create a list box on one side of the picture box and name it 'L'.
Re size the list box so it is wide enough to show some text.
Create a new button and set its text to "Choose a color".
Create a new button and set its text to "Find Closes Colors".
Goto Code of the form and declare the following:
Dim clr As Color
Dim L2 as New Listbox
Public Declare Function SetCursorPos Lib "user32"( ByVal X As Integer , ByVal Y As Integer ) As Integer
Double click the first button that is "Choose a color". The code window will open. Add the following code for its click event.
Dim x As New ColorDialog
If Not x.ShowDialog = Windows.Forms.DialogResult.Cancel Then
clr = *****lor
End If
Now Double Click the 2nd button "Find Closest Colors". In its click event add the following code:
l .Items.Clear()
l2.Items.Clear()
Dim width As Integer = p .Image.Size.Width
Dim height As Integer = p .Image.Size.Height
Dim bitmp As New Bitmap( p .Image)
For x As Integer = 0 To width - 1
For y As Integer = 0 To height - 1
Dim pixelColor As Color = bitmp.GetPixel(x, y )
If pixelColor.R = clr.R And pixelColor.G = clr.G Then
l .Items.Add(pixelColor.ToString)
If x p .Location.X Or x p .Width Or y p .Location.Y Or y p .Height Then
MsgBox( "Out of co-ordinates.")
Continue For
End If
l2.Items.Add(x & ":" & y )
End If
Next
Next
Now double-click the list-box named "L" on the form. It's SelectedIndexChanged event will be shown in the code window. Add the following code in it:
Try
If Not l .SelectedItem Is Nothing Then
Dim sp() As String = l2.Items( l .SelectedIndex).ToString.Split( ":")
SetCursorPos(sp(0),sp(1))
End If
Catch ex As Exception
End Try
Optionally, add the following code to the picturebox's MouseClick event:
Dim pix As Color = DirectCast ( p .Image,Bitmap).GetPixel( e .X - 1, e .Y - 1)
MsgBox( "RED = " & pix.R & vbCrLf & "GREEN = " & pix.G & vbCrLf & "BLUE = " & pix.B)
Run the project. Click the button and choose a color that exists in the image too. Expand the dialog box for a wide variety of custom colors. Try to choose the closest color as possible. After choosing, press the 2nd button. If it will find the chosen colors in the image too, it will add them to the listbox. After the items have been added. Click the items in the listbox, and it will take the cursor directly to the color's location in the picturebox.
This is just a start, as I don't really know what exactly you are trying to do. So, we can move on from here.
Hope this helps.
That Helps a lot but it will go to the picture box, and I don't want it to go to the picture box.
What I wanted to do is like get a color and when i am on the game it goes to that color, and this will only go to the picture box i guess?
Originally Posted by SoldierFront
That Helps a lot but it will go to the picture box, and I don't want it to go to the picture box.
What I wanted to do is like get a color and when i am on the game it goes to that color, and this will only go to the picture box i guess?
Yes, it moves with-in the picturebox. OK, for ingame, what kind of game is it ?? I mean do you have a menu in it from which you'll select a specific color ? Give me some details.
Sorry about the slow reply, I forgot about it xD
Anyways here's my code for triggering a click when mouse is over a certain color.
[REQUIREMENTS]
A timer with an interval of 1. That's it.
[php]
Option Explicit On
Imports System.Runtime.InteropServices
Friend Class Form1
Inherits System.Windows.Forms.Form
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 LEFTMOUSEUP = &H4
Private Const LEFTMOUSEDOWN = &H2
Private Sub MouseClicks()
mouse_event(LEFTMOUSEDOWN, 0, 0, 0, 0)
mouse_event(LEFTMOUSEUP, 0, 0, 0, 0)
End Sub
<StructLayout(LayoutKind.Sequential)> Private Structure POINTAPI
Dim x As Integer
Dim y As Integer
End Structure
Private Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As Integer
Private Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Integer) As Integer
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Timer1.Interval = 100
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick
Dim structCursorPosition As POINTAPI
Call GetCursorPos(structCursorPosition)
Dim lColor As Integer = GetPixel(GetDC(0), structCursorPosition.x, structCursorPosition.y)
Dim c As Color = ColorTranslator.FromOle(lColor)
Dim R1, G1, B1 As Integer
R1 = c.R
G1 = c.G
B1 = c.B
If RGB(c.R, c.G, c.B) = RGB(255, 3, 3) Then ' Change the 'RGB(255, 3, 3)' to whatever color'
Call MouseClicks()
MsgBox("OMG IT WORKED") ' remove this, i was just testing'
End If
End Sub
End Class
[/php]
Hope that works for you.
Probably DX game.
//offtopic
FUCK splinter cell conviction...
just fixxed one error and now there's the next one, fu ubisoft.
Soldier Front, its a shooting game.
I don't know what else to say its just like crossfire, Counter Strike and that.
Originally Posted by SoldierFront
Soldier Front, its a shooting game.
I don't know what else to say its just like crossfire, Counter Strike and that.
OK, how will you be able to select the color inside it ?