Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. // NoRecoilR6.cpp : définit le point d'entrée pour l'application console.
  2. //
  3.  
  4. #include <cstdlib>
  5. #include "stdafx.h"
  6. #include <windows.h>
  7. #include <tlhelp32.h>
  8. #include <string>
  9. #include <iostream>
  10. using namespace std;
  11.  
  12. bool keyDown(int vcode) {
  13. return GetAsyncKeyState(vcode) & ~32767;
  14. }
  15.  
  16.  
  17. int main(void) {
  18.  
  19. int x = 10;
  20. int xprime = -10;
  21. int y = -9;
  22. int yprime = 9;
  23.  
  24.  
  25.  
  26.  
  27. while (true)
  28. {
  29.  
  30. cout << x << endl;
  31. cout << y;
  32.  
  33.  
  34. if (keyDown(2))
  35. {
  36. while (keyDown(2))
  37. {
  38. if (keyDown(1))
  39. {
  40. while (keyDown(1))
  41. {
  42. mouse_event(MOUSEEVENTF_MOVE, y, x, 0, 0);
  43. Sleep(17);
  44. mouse_event(MOUSEEVENTF_MOVE, yprime, xprime, 0, 0);
  45. Sleep(10);
  46. }
  47. }
  48. }
  49. }
  50.  
  51. system("cls");
  52. }
  53.  
  54.  
  55. return 0;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement