Advertisement
Guest User

Turboclicker.exe

a guest
Mar 3rd, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  1. #include <stdafx.h>
  2. #include <windows.h>
  3. #include <string.h>
  4.  
  5. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow)
  6. {
  7.     POINT   pt = { 0 };
  8.     HWND    hwnd = NULL;
  9.     char szTitle[256];
  10.  
  11.     for (;;)
  12.     {
  13.         hwnd = GetForegroundWindow();
  14.         GetWindowTextA(hwnd, szTitle, sizeof(szTitle));
  15.         if (0 != strcmp(szTitle, "GunsOfIcarusOnline"))
  16.         {
  17.             Sleep(50);
  18.             continue;
  19.         }
  20.         if ((GetAsyncKeyState(VK_CONTROL) & 0x8000)
  21.             || !(GetAsyncKeyState(VK_LBUTTON) & 0x8000))
  22.         {
  23.             Sleep(50);
  24.             continue;
  25.         }
  26.  
  27.  
  28.  
  29.         GetCursorPos(&pt);
  30.         ScreenToClient(hwnd, &pt);
  31.  
  32.         SendMessage(hwnd, WM_LBUTTONDOWN, 0, MAKELONG(pt.x, pt.y));
  33.         Sleep(10);
  34.         SendMessage(hwnd, WM_LBUTTONUP, 0, MAKELONG(pt.x, pt.y));
  35.         Sleep(10);
  36.     }
  37.  
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement