Advertisement
Guest User

Untitled

a guest
May 1st, 2016
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <conio.h>
  3. #include <Windows.h>
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. bool check = false;
  11. cout << "F11-Stop\nF10-Start";
  12. while (true)
  13. {
  14. if (GetAsyncKeyState(VK_F10) && check==false)
  15. {
  16. check = true;
  17. }
  18. if (check == true)
  19. {
  20. mouse_event(MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0);
  21. Sleep(9);
  22. }
  23. if (GetAsyncKeyState(VK_F11) && check == true)
  24. {
  25. check = false;
  26. }
  27. }
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement