Ejemplo n.º 1
0
        /// <summary>
        /// 鼠标左键点击 x y坐标
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        public void click(int x, int y, int pianyix = 0, int pianyiy = 0)
        {
            int x1 = MyFuncUtil.suijishu(-2, 2);
            int y1 = MyFuncUtil.suijishu(-2, 2);

            mf.mydelay(50, 80);
            if ((x1 + x + pianyix < 0) || (y1 + y + pianyiy < 0) ||
                (x1 + x + pianyix > xianzhi_x) || (y1 + y + pianyiy > xianzhi_y))
            {
                WriteLog.WriteLogFile("", "出边界了.." + x + " " + y);
                return;
            }
            mf.Mydm.MoveTo(x + x1 + pianyix, y + y1 + pianyiy);
            mf.mydelay(60, 120);
            mf.Mydm.LeftDown();
            mf.mydelay(10, 50);
            mf.Mydm.LeftUp();
            mf.mydelay(10, 120);
        }