|
You last visited: Today at 14:29
Advertisement
Auto Click Macro (Help)
Discussion on Auto Click Macro (Help) within the .NET Languages forum part of the Coders Den category.
05/12/2019, 07:47
|
#1
|
elite*gold: 0
Join Date: Jan 2019
Posts: 74
Received Thanks: 3
|
Auto Click Macro (Help)
edited
|
|
|
05/14/2019, 08:54
|
#2
|
elite*gold: 4
Join Date: Feb 2008
Posts: 3,854
Received Thanks: 1,268
|
Maybe use pixel search or with image to get the location?
|
|
|
05/16/2019, 10:48
|
#3
|
elite*gold: 100
Join Date: Mar 2006
Posts: 1,826
Received Thanks: 430
|
What language are you planning to use to create this macro?
|
|
|
07/04/2019, 03:40
|
#4
|
elite*gold: 0
Join Date: Jan 2019
Posts: 74
Received Thanks: 3
|
Quote:
Originally Posted by killzone
What language are you planning to use to create this macro?
|
Hi, pref VB
|
|
|
07/16/2019, 19:36
|
#5
|
elite*gold: 0
Join Date: Jun 2012
Posts: 14
Received Thanks: 15
|
This might give you some ideas. It doesn't automatically detect any colors, but it allows you to set up custom coordinates for the clicker to go through.
|
|
|
07/17/2019, 22:15
|
#6
|
elite*gold: 0
Join Date: Apr 2017
Posts: 3
Received Thanks: 1
|
Public Const MOUSEEVENTF_LEFTDOWN = &H2
Public Const MOUSEEVENTF_LEFTUP = &H4
Declare Function apimouse_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) As Boolean
Sub l_maus(ByVal x As Integer, ByVal y As Integer, Optional ByVal time As Integer = 1)
System.Windows.Forms.Cursor.Position = New System.Drawing.Point(x, y)
Call apimouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
Threading.Thread.Sleep(time)
Call apimouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
End Sub
now you can search for vb.net screenshot and vb.net bmp get pixel color. adding r + g + b if its equal to your number click left coordinates else right coordinates
|
|
|
07/17/2019, 22:34
|
#7
|
elite*gold: 9
Join Date: Nov 2011
Posts: 40
Received Thanks: 15
|
For the main part of the script, it does seem to be entirely location-based (dealing with inventory items). Slowing down the video it clicks the first slot as a constant and then clicks the second slot (and then each repetition it adds a certain specific amount to the horizontal value to move across). When it reaches the end of the row it moves down one row and repeats the above not excluding the first slot this time.
As for the Ok and Cancel button changing between two, it does seem to be some form of get pixels. I'm not clued up on VB i'm afraid, and i think trying to include sikuli into vb for one button press is a little OTT. I remember seeing in a tutorial for python there was a function where you supply an image and then a variable is made based on numeric value of all the individual pixels of the image, and then using that to find it on the screen. I was wondering if there's similar for VB at all?
I did bump into:  while googling for VB solutions, is it of any help at all? Sorry, VB goes over my head i'm afraid.
|
|
|
08/07/2019, 18:12
|
#8
|
elite*gold: 0
Join Date: Jan 2019
Posts: 74
Received Thanks: 3
|
I can't do this guys. I'm looking for someone to do
|
|
|
08/10/2019, 02:19
|
#9
|
elite*gold: 0
Join Date: Aug 2019
Posts: 9
Received Thanks: 21
|
simple as that:
1) Import some stuff
Code:
Imports System.Runtime.InteropServices
2) u need to import the mouse event from the user32.dll to handle the click
Code:
<DllImport("user32.dll")>
Private Sub mouse_event(dwFlags As UInteger, dx As Integer, dy As Integer, dwData As UInteger, dwExtraInfo As Integer)
End Sub
3) declare the function to set the mouse Position
Code:
Declare Function SetCursorPos Lib "user32" (ByVal X As Integer, ByVal Y As Integer) As Integer
4) declare the mouse key adresses to handle the click
Code:
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
Private Const MOUSEEVENTF_MIDDLEUP = &H40
Private Const MOUSEEVENTF_MOVE = &H1
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
5.1) move the mouse
Code:
Public Sub MoveMouse(ByVal xMove As Integer, ByVal yMove As Integer)
mouse_event(MOUSEEVENTF_MOVE, xMove, yMove, 0, 0) '[move the mouse by xMove and yMove pixels]
End Sub
5.2) set mouse position
Code:
SetCursorPos(X, Y) 'X=X coord | Y = Y coord [Set the exact position]
6) perform the click
Code:
Public Sub LClick()
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0) ' Down
System.Threading.Thread.Sleep(10)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0) ' Up
End Sub
And your done, HF
|
|
|
Similar Threads
|
RF ONLINE , AUTO CLICK , AUTO LOOT , AUTO SKILL
07/26/2018 - RF Online - 10 Replies
http://i1200.photobucket.com/albums/bb333/AMDoverd rive/VIP2_zpse2abf703.png
Auto X ( RF ONLINE AUTO LOOT )
Auto Skill ( RF ONLINE AUTO SKILL AND BUFF )
Auto X + SKL ( RF ONLINE AUTO SKILL AND BUFF + LOOT )
Auto Click ( RF ONLINE AUTO CLICK )
Advanced BD ( Auto Skill RF ONLINE AUTO SKILL AND BUFF FAST RESPOND MODE )
Advanced + X ( Auto Skill RF ONLINE AUTO SKILL AND BUFF + LOOT FAST RESPOND MODE )
|
Like map click macro. Box Collect Macro with MacroRecorder?
05/25/2015 - DarkOrbit - 0 Replies
#closerequest
|
click click click!!!!!!!!!!!
09/07/2007 - Off Topic - 14 Replies
if you reeeeaaaallyyy >are< bored (or if you are annoyed that you have to work on a saturday or smthing :D)
Click for Germany - Click Click Click - ClickClickClick.com - Click game
here you go ^^
nebenbei, japan hat ca. 500 mill klicks mehr als deutschland!!!!!
|
All times are GMT +1. The time now is 14:30.
|
|