• Log in or sign up for an account here: https://www.sythe.org/login

Can someone help me with an auto clicker???

  • Thread starter Thread starter alexandr
  • Start date Start date
A

alexandr

Guest
hey, iim making a program that displays the exact color and its rgb value of whatever the mouse is hovering over, i want to make it to where you type in an rgb value and the cursor goes to the nearest place with that rgb value. here is a code for moving the cursor to a specified coordinate, can i just modify it to move to rgb values insted?? cursor.position = new point (78, 90)
thanks for anyones help!!!
 
Hey, I'm not sure about VB .NET but in Delphi the commands are:

SetCursorPos(x,y)
And
Mouse_event(.................)

Not sure, but I'll have to look them up, try making it in Delphi; VB .NET 2005 can be decompiled, you wouldn't want that to happen would you?
 
i have the code in vb.net to move the cursor, its
cursor.position = new point (x, y)
but wat i want to do is instead of using x,y coordinates , i would like it to be rgb values
 
tired of seeing people post about using other languages other than the one the person is asking about...
program being decompiled, who cares? if we were making some uber clone of adobe cs3 and wanted to sell it, maybe, but we're not..

people need to help with the language one needs help with or stfu..

[/end of bitching]
 
i know how to move the cursor, and how to make it click, i want to move it to an rgb color value instead of xy mouse coordinates.
 
Ive tried
Code:
cursor.position = new point (RGB(255,0,0),RGB(255,0,0))
that shud work but it doesnt..

Got a new code use do loop until statements
use slashshots find color or w/e
Code:
 Private Sub KryptonButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KryptonButton1.Click
        timer1.start()
    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If PictureBox2.BackColor = PictureBox1.BackColor Then
            'What ever you want it to do
        Else
            Cursor.Position = New Point(MousePosition.X + 1, MousePosition.Y)
            If MousePosition.X = Screen.PrimaryScreen.Bounds.Width Then
                Cursor.Position = New Point(MousePosition.X - Screen.PrimaryScreen.Bounds.Width, MousePosition.Y + 1)
            ElseIf MousePosition.Y = Screen.PrimaryScreen.Bounds.Height Then
                MsgBox("The chose color was not found")
            End If
        End If
    End Sub

    Private Function findColor(ByVal Color As Color, ByVal Area As Rectangle) As Point
        Dim AreaSize As Size = Area.Size
        Dim TempBitmap As New Bitmap(AreaSize.Width, AreaSize.Height)
        Graphics.FromImage(TempBitmap).CopyFromScreen(Area.Location, New Point(), AreaSize)
        For x As Integer = 0 To Area.Height - 1
            For y As Integer = 0 To Area.Width - 1
                If TempBitmap.GetPixel(x, y) = Color Then Return New Point(Area.X + x, Area.Y + y)
            Next
        Next
        Return New Point(-1, -1)
    End Function

    Private Sub KryptonButton2_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles KryptonButton2.MouseUp
        Dim TempBitmap As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
        Graphics.FromImage(TempBitmap).CopyFromScreen(Screen.PrimaryScreen.Bounds.Location, New Point(), Screen.PrimaryScreen.Bounds.Size)
        PictureBox1.BackColor = TempBitmap.GetPixel(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y)
        KryptonButton1.Enabled = True
    End Sub

K i edit it heres my code... i dont have any hot keys yet maybe l8tr
NOTE: ignore KRYPTON it is a visual style basically (not free i have trial, its really good ^_^)

Code:
Private Sub KryptonButton2_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles KryptonButton2.MouseUp
        Dim TempBitmap As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
        Graphics.FromImage(TempBitmap).CopyFromScreen(Screen.PrimaryScreen.Bounds.Location, New Point(), Screen.PrimaryScreen.Bounds.Size)
        PictureBox1.BackColor = TempBitmap.GetPixel(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y)
        'My button is disabled so you cant click it if color is not selected..
        KryptonButton1.Enabled = True
    End Sub

that gets the color chosen... heres the function needed

Code:
 Private Function findColor(ByVal Color As Color, ByVal Area As Rectangle) As Point
        Dim AreaSize As Size = Area.Size
        Dim TempBitmap As New Bitmap(AreaSize.Width, AreaSize.Height)
        Graphics.FromImage(TempBitmap).CopyFromScreen(Area.Location, New Point(), AreaSize)
        For x As Integer = 0 To Area.Height - 1
            For y As Integer = 0 To Area.Width - 1
                If TempBitmap.GetPixel(x, y) = Color Then Return New Point(Area.X + x, Area.Y + y)
            Next
        Next
        Return New Point(-1, -1)
    End Function

heres what hapenes wen ur timers enabled

Code:
If PictureBox2.BackColor = PictureBox1.BackColor Then
            'What ever you want it to do
        Else
            Cursor.Position = New Point(MousePosition.X + 1, MousePosition.Y)
            If MousePosition.X = Screen.PrimaryScreen.Bounds.Width Then
                Cursor.Position = New Point(MousePosition.X - Screen.PrimaryScreen.Bounds.Width, MousePosition.Y + 1)
            ElseIf MousePosition.Y = Screen.PrimaryScreen.Bounds.Height Then
                MsgBox("The chose color was not found")
            End If
        End If

then make a start button and add this

Code:
timer1.start()
 
Back
Top