Results 1 to 4 of 4

Thread: a strange porblem again

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    10

    Angry a strange porblem again

    id like to apologise for not stating this in the previous thread but this bot will NEVER be used, i'd rather train my account myself and the only reason i wrote this was to try to learn a few things which were bugging me about stuff

    other than that its the same as before

    Code:
    VERSION 5.00
    Begin VB.Form frmmain 
       BackColor       =   &H80000004&
       BorderStyle     =   1  'Fixed Single
       ClientHeight    =   252
       ClientLeft      =   120
       ClientTop       =   744
       ClientWidth     =   1452
       LinkTopic       =   "Form1"
       MaxButton       =   0   'False
       MinButton       =   0   'False
       ScaleHeight     =   252
       ScaleWidth      =   1452
       StartUpPosition =   3  'Windows Default
       Begin VB.HScrollBar scrollbar 
          Height          =   252
          Left            =   0
          Max             =   5000
          Min             =   1000
          TabIndex        =   0
          Top             =   0
          Value           =   1000
          Width           =   1452
       End
       Begin VB.Timer tmclick 
          Left            =   2160
          Top             =   600
       End
       Begin VB.Menu mnufile 
          Caption         =   "file"
          Begin VB.Menu mnufilerun 
             Caption         =   "run"
             Shortcut        =   {F1}
          End
          Begin VB.Menu mnufilestop 
             Caption         =   "stop"
             Shortcut        =   {F2}
          End
          Begin VB.Menu mnufileexit 
             Caption         =   "exit"
             Shortcut        =   {DEL}
          End
       End
    End
    Attribute VB_Name = "frmmain"
    Attribute VB_GlobalNameSpace = False
    Attribute VB_Creatable = False
    Attribute VB_PredeclaredId = True
    Attribute VB_Exposed = False
    Option Explicit
    
    Dim gotcurpos As Boolean
    
            Dim click_coordinates1_1 As Integer
                Dim click_coordinates1_2 As Integer
    
            Dim click_coordinates2_1 As Integer
                Dim click_coordinates2_2 As Integer
    
            Dim click_coordinates3_1 As Integer
                Dim click_coordinates3_2 As Integer
    
    Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
    
    Private Type POINTAPI
        X As Long
        Y As Long
    End Type
    
    Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    
    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 MOUSELEFTDOWN = &H2
            Private Const MOUSELEFTUP = &H4
    
        Private Const MOUSERIGHTUP = &H8
            Private Const MOUSERIGHTDOWN = &H10
    
    Public Function GetXCursorPos() As Long
    
       Dim pt As POINTAPI
       GetCursorPos pt
       GetXCursorPos = pt.X
    
    End Function
    
    Public Function GetYCursorPos() As Long
    
       Dim pt As POINTAPI
       GetCursorPos pt
       GetYCursorPos = pt.Y
    
    End Function
    
    Private Sub Form_Load()
    
        tmclick.Enabled = 0
    
    End Sub
    
    Private Sub mnufilerun_Click()
    
        tmclick.Enabled = 1
        tmclick.Interval = scrollbar.Value
    
    End Sub
    
    Private Sub mnufilestop_Click()
    
        tmclick.Enabled = 0
    
    End Sub
    
    Private Sub tmclick_Timer()
    
        If gotcurpos = False Then _
            click_coordinates1_1 = GetXCursorPos
        If gotcurpos = False Then _
            click_coordinates1_2 = GetYCursorPos
    
        gotcurpos = True
        
        
    
            click_coordinates2_1 = 350             'var2 x
                click_coordinates2_2 = 830         'var2 y
    
            click_coordinates3_1 = click_coordinates2_1
                click_coordinates3_1 = click_coordinates2_1 - 50
                
                
    
        SetCursorPos click_coordinates1_1, click_coordinates1_2
    
        mouse_event MOUSELEFTDOWN, 0, 0, 0, 0
            mouse_event MOUSELEFTUP, 0, 0, 0, 0
    
        SetCursorPos click_coordinates2_1, click_coordinates2_2
    
        mouse_event MOUSERIGHTDOWN, 0, 0, 0, 0
            mouse_event MOUSERIGHTUP, 0, 0, 0, 0
    
        SetCursorPos click_coordinates3_1, click_coordinates3_2
    
        mouse_event MOUSELEFTDOWN, 0, 0, 0, 0
            mouse_event MOUSELEFTUP, 0, 0, 0, 0
    
    End Sub

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Re: a strange porblem again

    Err, what's exactly the problem?

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: a strange porblem again

    Quote Originally Posted by honeybee View Post
    Err, what's exactly the problem?

    .
    I suspect OP is referring to this thread: http://www.vbforums.com/showthread.php?t=636579 which was closed by Mods as it relates to Game Bots ('Cheats') which are contrary to the Forum Guidelines.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: a strange porblem again

    This is strike number two.

    If you ask another question about creating a bot displinary actions, which may include a ban, will be instituted. As previously stated
    Quote Originally Posted by MartinLiss View Post
    We don't support cheating at on-line games. Thread closed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width