Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- #include <Windows.h>
- int main()
- {
- int type;
- int sleep;
- bool doublec;
- bool on = false;
- std::cout << "write type \n 0 - autoclick \n 1 - duble click \n";
- std::cin >> type;
- if (type == 0)
- {
- std::cout << "write sleep";
- std::cin >> sleep;
- std::cout << "program sleeping " << sleep;
- on = true;
- }
- ShowWindow(GetConsoleWindow(), SW_HIDE);
- while (on){
- while (GetAsyncKeyState(VK_RBUTTON))
- {
- mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
- mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
- Sleep(sleep);
- }
- if (GetAsyncKeyState(VK_CONTROL))
- {
- exit(0);
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement