Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- using namespace std;
- int cps;
- int main()
- {
- cout << "CPS?\n";
- cin >> cps;
- INPUT input{ 0 };
- input.type = INPUT_MOUSE;
- bool bClick = false;
- while (true)
- {
- //toggles it on and off
- if (GetAsyncKeyState('U') &1)
- bClick = !bClick;
- if (bClick)
- {
- input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
- SendInput(1, &input, sizeof(INPUT));
- input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
- SendInput(1, &input, sizeof(INPUT));
- Sleep(1000/cps);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement