Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. #include "ScanContents.h"
  2.  
  3. bool TakeScreenshot(std::string WindowToFind, BITMAP &bm, HBITMAP &hbmap, BITMAPINFO &bmi, HDC &hdcShot, HBITMAP &hbitmapOld, HWND &hwnd);
  4.  
  5.  
  6. void SetupBitmapInfo(BITMAPINFO &bmi, int bWidth, int bHeight, int bitsPerPixel);
  7. bool CompareColour(RGBQUAD * pPixels, int height, int width, int x, int y);
  8. void ScanBMP(ScanContents * scan);
  9. bool Aim_Bot(HWND appWnd, std::string GameWindow);
  10.  
  11. MouseCoord CurrentMouseXY(0, 0);
  12.  
  13.  
  14.  
  15. int main()
  16. {
  17. std::string GameWindow = "RatzInstagib2.0";
  18. HWND appWnd = FindWindow(0, GameWindow.c_str());
  19.  
  20.  
  21. while (!appWnd)
  22. {
  23. system("CLS");
  24. std::cout << "Unable to find" << GameWindow.c_str() << std::endl;
  25. Sleep(500);
  26. }
  27.  
  28. POINT currentPos;
  29. GetCursorPos(& currentPos);
  30. CurrentMouseXY.X = currentPos.x;
  31. CurrentMouseXY.Y = currentPos.y;
  32.  
  33. Aim_Bot(appWnd, GameWindow);
  34. system("pause");
  35. return 0;
  36. }
  37.  
  38. bool Aim_Bot(HWND appWnd, std::string GameWindow);
  39. {
  40.  
  41. RECT rcWindow;
  42. GetWindowRect(appWnd, &rcwindow);
  43. BITMAP bm;
  44. HBITMAP hbmap;
  45. HBITMAP hbmapOld;
  46. BITMAPINFO bmi;
  47. HDC hdcShot;
  48. HDC hdcScreen;
  49.  
  50. RGBQUAD * pPixels;
  51.  
  52. int TimeTakenScreenAndScan;
  53. while (true)
  54. {
  55. if (!GetAsyncKeyState('X'))
  56. {
  57. TimeTakenScreenAndScan = clock();
  58.  
  59. if (!TakeScreenshot(GameWindow, bm, hbmap, bmi, hdcShot, hbmapOld, appWnd))
  60. break;
  61.  
  62. HBITMAP hbmapNew = CreateCompatibleBitmap(hdcShot, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top);
  63.  
  64. HDC hdcShot
  65.  
  66.  
  67.  
  68.  
  69.  
  70. }
  71.  
  72.  
  73.  
  74.  
  75. }
  76.  
  77.  
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement