| View previous topic :: View next topic |
| Author |
Message |
getdead Advanced Cheater
Reputation: 0
Joined: 20 Aug 2008 Posts: 66 Location: Kiwi Plantation
|
Posted: Tue Sep 09, 2008 4:57 am Post subject: Need help about code in VB6 (im new to VB) |
|
|
can any1 tell me the code for clicking on coordinates i put)
for example i want left 23 up 23 and how do i write the code
I already made start and stop and added timer but dunno whats the dcode for the clciking and HOW DO I FIND THE COORDINATES) any programs?
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Tue Sep 09, 2008 6:20 am Post subject: |
|
|
use API's:
SetCursorPos - to put the cursor's coordinates
mouse_event - to send mouse events (left click / right click)
to get the coordinates use GetCursorPos API
_________________
Stylo |
|
| Back to top |
|
 |
getdead Advanced Cheater
Reputation: 0
Joined: 20 Aug 2008 Posts: 66 Location: Kiwi Plantation
|
Posted: Tue Sep 09, 2008 6:24 am Post subject: |
|
|
ummmm.......okkkkk.......will try...(i said im new to VB)
whats API?
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Tue Sep 09, 2008 6:29 am Post subject: |
|
|
Application Programming Interface
but i suggest u if you're new to vb and as i can see new to programming too start with something smaller and read about API's
_________________
Stylo |
|
| Back to top |
|
 |
getdead Advanced Cheater
Reputation: 0
Joined: 20 Aug 2008 Posts: 66 Location: Kiwi Plantation
|
Posted: Tue Sep 09, 2008 6:31 am Post subject: |
|
|
oki....i just know how to make web browser
oki will learn the stf
|
|
| Back to top |
|
 |
sloppy Expert Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 123
|
Posted: Tue Sep 09, 2008 7:05 am Post subject: |
|
|
I have zero experience with VB, but I'll give you a PostMessage example in C# and hopefully someone else here can translate it to VB jargon for you.
| Code: | [DllImport("user32.dll")]
private static extern bool PostMessageA(IntPtr hWnd, uint Msg, uint wParam, uint lParam);
[DllImport("user32.dll")]
private static extern bool ClientToScreen(IntPtr hWnd, ref Point p);
[DllImport("user32.dll")]
private static extern bool SetCursorPos(int x, int y);
const uint WM_LBUTTONDOWN = 0x0201;
const uint WM_LBUTTONUP = 0x0202;
const uint MK_LBUTTON = 0x0001;
public void Click(IntPtr hWnd, int x, int y)
{
Point p = new Point(x, y);
ClientToScreen(hWnd, ref p)
SetCursorPos(p.X, p.Y)
Thread.Sleep(10); // increase delay if cursor moves but does not click.
PostMessageA(hWnd, WM_LBUTTONDOWN, MK_LBUTTON, MakeLParam(x, y));
PostMessageA(hWnd, WM_LBUTTONUP, 0, MakeLParam(x, y));
}
private uint MakeLParam(int LoWord, int HiWord)
{
return (uint)((HiWord << 16) | (LoWord & 0xFFFF));
} |
Note: Will need to hook hop PostMessageA & SetCursorPos for GG protected games.
|
|
| Back to top |
|
 |
getdead Advanced Cheater
Reputation: 0
Joined: 20 Aug 2008 Posts: 66 Location: Kiwi Plantation
|
Posted: Tue Sep 09, 2008 7:07 am Post subject: |
|
|
| THX...will try
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
|
| Back to top |
|
 |
|