Esempio n. 1
0
        public static void MouseClickS(IntPtr handle, int x, int y, int t)
        {
            OPImage.User32.RECT windowRect = new OPImage.User32.RECT();
            OPImage.User32.GetWindowRect(handle, ref windowRect);
            SetCursorPos(x+windowRect.left, y+windowRect.top);
            Thread.Sleep(200);

            mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
            Thread.Sleep(200);
            mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
            if (t != 0) Thread.Sleep(t);
        }
Esempio n. 2
0
        public static void MouseClickS(IntPtr handle, int x, int y, int t)
        {
            OPImage.User32.RECT windowRect = new OPImage.User32.RECT();
            OPImage.User32.GetWindowRect(handle, ref windowRect);
            SetCursorPos(x + windowRect.left, y + windowRect.top);
            Thread.Sleep(200);

            mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
            Thread.Sleep(200);
            mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
            if (t != 0)
            {
                Thread.Sleep(t);
            }
        }