Simple2012

Untitled

Oct 17th, 2013
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. void events::moveItemStack(const int x, const int y, const int newx, const int newy){
  2.     SendMessage(hWnd, WM_SYSKEYDOWN, VK_CONTROL, 0); // Press down CTRL (windows.h)
  3.     Sleep(100);
  4.     SendMessage(hWnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(x, y-20)); // Left mouseclick down  (windows.h)
  5.     Sleep(100);
  6.     SendMessage(hWnd, WM_LBUTTONUP, MK_LBUTTON, MAKELPARAM(newx, newy-20)); // left mouseclick up  (windows.h)
  7.     Sleep(100);
  8.     SendMessage(hWnd, WM_SYSKEYUP, VK_CONTROL, 1); // Let go of CTRL  (windows.h)
  9.     Sleep(100);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment