I'm trying to get C++ to simulate mouse clicks
I found this on Mouse Click - C++
Code:
1.
#include <iostream>
2.
#include <windows.h>
3.
4.
using namespace std;
5.
6.
int main ()
7.
{
8.
int n = 1;
9.
int x;
10.
int y;
11.
12.
while (n !=NULL)
13.
14.
{
15.
16.
if(GetAsyncKeyState(VK_NUMPAD0))
17.
(
18.
19.
mouse_event(MOUSEEVENT_LEFTDOWN, x, y, 100, 100));
20.
mouse_event(MOUSEEVENT_LEFTDOWN, x, y, 200, 200));
21.
22.
}
23.
24.
if(GetAsyncKeyState(VK_NUMBPAD1))
25.
break;
26.
27.
}
28.
29.
return 0;
30.
31.
32.
}
I'm using the GUI Anjuta on ubunutu linux, and it can't execute the above code correctly
It ends with "make: *** No rule to make target `New'. Stop."
The File name is "New File 1"
So if anyone could please tell me where the error is? or suggest a better way of learning how to program mouse clicks