[vb6]MultiPosition Autoclicker (clicking) help

Technical Discussions not Related Directly to MHS. For Example, Coding, Hex Editing, General Hacking, Etc.

Moderators: g3nuin3, SpeedWing, WhiteHat

[vb6]MultiPosition Autoclicker (clicking) help

Postby No1DeSeRvUaE » Sat Jan 17, 2009 3:28 am

Ive coded the positions (x,y) and everything else (help and hotkeys and stuff) but i need help in coding the clicking option

i want it to click the positions i set and they are multiple so when i start it clicks like this example:

point 1 (143, 412)
point 2 (155, 134)
point 3 (167, 154)
point 4 (123, 321)
and repeats (of course) and i want the values of x,y to be set by the user

ive added them to a new form named form2 and the coords are in labels which are:

x coord:
x (point 1)
xx (point 2)
xxx (point 3)
xxxx (point 4)

y coord:
y (point 1)
yy (point 2)
yyy (point 3)
yyyy (point 4)

and the coords are already set to a hotkey to set them in the clicker
No1DeSeRvUaE
Sir Hacks-A-Lot
 
Posts: 31
Joined: Fri Jan 16, 2009 3:17 am

Postby L. Spiro » Sat Jan 17, 2009 7:04 am

I do not use Visual Basic.

Here is an example in L. Spiro Script that goes through any list of points and clicks them.
It would be up to you to prompt the user to know which points to click etc.


Code: Select all
VOID ClickOnThings() {
   POINT pPoints[] = {
      { 143, 412 },
      { 155, 134 },
      { 167, 154 },
      { 123, 321 },
   };
   
   // To calculate the final click positions we need the screen
   //   resolution.
   INT iScreenW = GetPrimScreenWidth();
   INT iScreenH = GetPrimScreenHeight();
   
   // Click on all the points in the list.
   for ( INT I = 0; I < sizeof( pPoints ) / sizeof( pPoints[0] ); ++I ) {
      INT iClickX = pPoints[I].x * 65535.0f / iScreenW;
      INT iClickY = pPoints[I].y * 65535.0f / iScreenH;
      M_CLICK( iClickX, iClickY );
      
      // Optionally add a delay between clicks.
      //Sleep( 10 );
   }
}



L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: [vb6]MultiPosition Autoclicker (clicking) help

Postby x4NG3L » Wed Nov 25, 2009 12:14 pm

He asked in VB6... =P

Just use:

Code: Select all
Private Sub SendClick(lHwnd As Long, X As Long, Y As Long)
Dim lParam As Long
lParam = (Y * &H10000) + X
SendMessage lHwnd, WM_LBUTTONDOWN, 0&, ByVal lParam
SendMessage lHwnd, WM_LBUTTONUP, 0&, ByVal lParam
End Sub


In your code, get Hwnd of objet or window.
Knowledge is evolving.
User avatar
x4NG3L
Sir Hacks-A-Lot
 
Posts: 31
Joined: Fri Nov 20, 2009 5:20 am


Return to Technical Unrelated

Who is online

Users browsing this forum: No registered users and 0 guests