Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include "pch.h"
  2. #include <iostream>
  3. #include <Windows.h>
  4.  
  5. int main()
  6. {
  7. int type;
  8. int sleep;
  9. bool on = false;
  10.  
  11. std::cout << "write sleep";
  12. std::cin >> sleep;
  13. std::cout << "program sleeping " << sleep;
  14. on = true;
  15.  
  16. while (on){
  17.  
  18. while (GetAsyncKeyState(VK_RBUTTON))
  19. {
  20. mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
  21. mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
  22. Sleep(sleep);
  23. }
  24. };
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement