예제 #1
0
파일: win32.cs 프로젝트: czqsole/rongyao
        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);
        }
예제 #2
0
파일: win32.cs 프로젝트: ledudu/rongyao
        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);
            }
        }