#include #include #include using namespace std; int main() { vectorxary; vectoryary; int clicks = 0; int index = 0; while(!GetAsyncKeyState(VK_SPACE)) { if (GetAsyncKeyState(VK_LBUTTON)){ Sleep(150); POINT cursorPos; GetCursorPos(&cursorPos); xary.push_back(cursorPos.x); yary.push_back(cursorPos.y); ++index; ++clicks; } } /*cout << xary[0] << " " << yary[0]; cout << "\n"; cout << xary[1] << " " << yary[1]; */ for (int i = 0; i < xary.size(); i++) { Sleep(10); SetCursorPos(xary[i],yary[i]); mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); } //cin.get(); return 0; }