bool h = true;
do
{
if (MOUSEEVENTF_LEFTDOWN == h)
{
MOUSEEVENTF_RIGHTDOWN;
MOUSEEVENTF_RIGHTUP;
}
} while (1 > 0);
system("PAUSE");
return EXIT_SUCCESS;
}
Ignore all the libraries (The code is much bigger).
To press mouse I also use a code downloaded from the intenet
INPUT *buffer = new INPUT[3];
int X;
int Y;
X = 150;
Y = 856;
(buffer+1)->type = INPUT_MOUSE;
(buffer+1)->mi.dx = 100;
(buffer+1)->mi.dy = 100;
(buffer+1)->mi.mouseData = 0;
(buffer+1)->mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
(buffer+1)->mi.time = 0;
(buffer+1)->mi.dwExtraInfo = 0;
Bookmarks