Using Borland C++ Builder 6
How to make a program to make the mouse click both left & right?
How to make the mouse move?
How to make the mouse hold and drag?
How to make the mouse double click?
Help please. Thank you in pre-advance.
//ColacX
Following codes is in console where i can easily get the mouse position but not affect it.
//---------------------------------------------------------------------------
#include #pragma hdrstop
#include #include //---------------------------------------------------------------------------
#pragma argsused
int main()
{
POINT mouse;
while(true)
{
GetCursorPos(&mouse);
cout<<mouse.x<<" "<<mouse.y<<endl;
Sleep(1000);
}
}
//---------------------------------------------------------------------------
Comments
=============================================
never lie -- the government doesn't like the competition. (Author unknown)
: 1
: =============================================
: never lie -- the government doesn't like the competition. (Author
: unknown)
Link doesn't exist.
: : 1
: : =============================================
: : never lie -- the government doesn't like the competition. (Author
: : unknown)
:
: Link doesn't exist.
:
Sorry about that. To simulate pressing the left mouse button post a WM_LBUTTONDOWN message -- do a google search for WM_LBUTONDOWN and you will find examples.
=============================================
never lie -- the government doesn't like the competition. (Author unknown)
[code]void __fastcall TForm1::Button5Click(TObject *Sender)
{
mouse_event(MOUSEEVENTF_MOVE,-500,0,0,0);
mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0);
}[/code]
Right now im trying too learn everything in winuser.h