SendMessage(FindWindow(NULL,"Cossacks"),WM_LBUTTONDOWN,MK_SHIFT,MAKELPARAM(x,y)); SendMessage(FindWindow(NULL,"Cossacks"),WM_LBUTTONUP,MK_SHIFT,MAKELPARAM(x,y));
keybd_event(VK_SHIFT,0,0,0);mouse_event(MOUSEEVENTF_LEFTDOWN,x,y,0,0);mouse_event(MOUSEEVENTF_LEFTUP,x,y,0,0);keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0);
case WM_HOTKEY: switch(wParam) { case 0x00F: SetCursorPos(x,y); keybd_event(VK_SHIFT,0,0,0); for(i=0;i<5;i++) { SendMessage(hWndCossacks,WM_LBUTTONDOWN,0,MAKELPARAM(x,y)); Sleep(4); } keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0); break;