Advertisement
Guest User

Untitled

a guest
Aug 25th, 2013
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <Windows.h>
  4.  
  5. using namespace std;
  6.  
  7. void leftdown()
  8. {
  9.     PINPUT click = new INPUT;
  10.     click->type = INPUT_MOUSE;
  11.     click->mi.dx = 0;
  12.     click->mi.dy = 0;
  13.     click->mi.dwFlags = 0x2;
  14.     click->mi.mouseData = 0;
  15.     click->mi.time = 0;
  16.     click->mi.dwExtraInfo = 0;
  17.     SendInput(1,click,sizeof(INPUT));
  18. }
  19.  
  20. void leftup()
  21. {
  22.     PINPUT click = new INPUT;
  23.     click->type = INPUT_MOUSE;
  24.     click->mi.dx = 0;
  25.     click->mi.dy = 0;
  26.     click->mi.mouseData = 0;
  27.     click->mi.time = 0;
  28.     click->mi.dwExtraInfo = 0;
  29.     click->mi.dwFlags = 0x4;
  30.     SendInput(1,click,sizeof(INPUT));
  31. }
  32.  
  33. void main()
  34. {
  35.     Sleep(3000);
  36.     while(1)
  37.     {
  38.         SetCursorPos(961, 840);
  39.         Sleep(200);
  40.         leftdown();
  41.         Sleep(200);
  42.         leftup();
  43.         Sleep(3000);
  44.         SetCursorPos(1521, 145);
  45.         Sleep(200);
  46.         leftdown();
  47.         Sleep(200);
  48.         leftup();
  49.         Sleep(500);
  50.         SetCursorPos(905, 556);
  51.         Sleep(200);
  52.         leftdown();
  53.         Sleep(200);
  54.         leftup();
  55.         Sleep(2000);
  56.         SetCursorPos(964, 597);
  57.         Sleep(200);
  58.         leftdown();
  59.         Sleep(200);
  60.         leftup();
  61.         Sleep(500);
  62.     }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement