Click on Screen Co-Ordinates

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts Page 1 of 1
Contributors
User avatar
astheyfall
VIP - Donator
VIP - Donator
Posts: 160
Joined: Sun Sep 19, 2010 6:13 am

Click on Screen Co-Ordinates
astheyfall
Hello, I am in need of a tutorial on how to make a program click on set co-ordinates for my next program you can enter the X and Y Cords in a textbox or two (Doesn't matter) and you can set how many times you want it to do it and a button to start it and you can set the speed of the movement.

You will get credit, Thanks :)
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

You mean a Program that Controls your Cursor,and it clicks on specified Screen Positions ?
YouTube Downloader v3.0
Image
Image
Image
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

If u meaned that,then here...i found this Code with Google maybe u will give it a try.
Code: Select all
' Access the GetCursorPos function in user32.dll
      Declare Function GetCursorPos Lib "user32" _
      (lpPoint As POINTAPI) As Long
      ' Access the GetCursorPos function in user32.dll
      Declare Function SetCursorPos Lib "user32" _
      (ByVal x As Long, ByVal y As Long) As Long

      ' GetCursorPos requires a variable declared as a custom data type
      ' that will hold two integers, one for x value and one for y value
      Type POINTAPI
         X_Pos As Long
         Y_Pos As Long
      End Type

      ' Main routine to dimension variables, retrieve cursor position,
      ' and display coordinates
      Sub Get_Cursor_Pos()

      ' Dimension the variable that will hold the x and y cursor positions
      Dim Hold As POINTAPI

      ' Place the cursor positions in variable Hold
      GetCursorPos Hold

      ' Display the cursor position coordinates
      MsgBox "X Position is : " & Hold.X_Pos & Chr(10) & _
         "Y Position is : " & Hold.Y_Pos
      End Sub

      ' Routine to set cursor position
      Sub Set_Cursor_Pos()

      ' Looping routine that positions the cursor
         For x = 1 To 480 Step 20
            SetCursorPos x, x
            For y = 1 To 40000: Next
         Next x
      End Sub
YouTube Downloader v3.0
Image
Image
Image
User avatar
astheyfall
VIP - Donator
VIP - Donator
Posts: 160
Joined: Sun Sep 19, 2010 6:13 am

Re: Click on Screen Co-Ordinates
astheyfall
Can you explain where everything goes or tell me the link?
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

Just Put all Code in a Module or something,and play something around with it...i didnt tested it,soo..
BTW here is the Link http://support.microsoft.com/kb/152969
But its in German,maybe use Google to translate to your Language.
YouTube Downloader v3.0
Image
Image
Image
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: Click on Screen Co-Ordinates
mandai
6 posts Page 1 of 1
Return to “Tutorial Requests”