rendered paste body#include <windows.h>
#include <iostream.h>
#include <stdio.h>
#include <fstream.h>
#include <windows.h>
int main()
{
fstream file("macro.txt",ios::out);
fstream file1("clicks.txt", ios::app | ios::out);
POINT p;
HWND cur;
int num=0;
for(;;)
{
GetCursorPos(&p);
Sleep(50);
system("cls");
file << p.x <<","<< p.y << endl;
cout <<"Mouse Position:"<< num << " "<< p.x <<","<< p.y << endl;
num++;
}
for(;;){
if(GetAsyncKeyState(VK_LEFT)){
GetCursorPos(&p);
file1 << p.x <<","<< p.y << endl;
}
}
}