コード例 #1
0
        public static void Drag(int x1, int y1, int x2, int y2)
        {
            Point newPos1 = Convert(new Point(x1, y1));
            Point newPos2 = Convert(new Point(x2, y2));

            AutoItX.MouseClickDrag("LEFT", newPos1.X, newPos1.Y, newPos2.X, newPos2.Y);
        }
コード例 #2
0
ファイル: RobotCMB.cs プロジェクト: lhunnelSpiral/MyProject
        private void SearchAndSelectComboBox(IntPtr mainWindow, IntPtr searchComboBox, string value)
        {
            Rectangle mainWindowPosition = AutoItX.WinGetPos(mainWindow);
            Rectangle refElementPosition = AutoItX.ControlGetPos(mainWindow, searchComboBox);
            int       startX             = mainWindowPosition.X + refElementPosition.X;
            int       startY             = mainWindowPosition.Y + refElementPosition.Y;
            int       elementPossitionX  = startX + 10;
            int       elementPossitionY  = startY + 10;

            AutoItX.MouseMove(elementPossitionX, elementPossitionY);

            AutoItX.MouseClickDrag("LEFT", elementPossitionX, elementPossitionY, elementPossitionX + 100, elementPossitionY + 30, 100);
            AutoItX.MouseDown();
            AutoItX.MouseUp();

            AutoItX.ClipPut(value);
            AutoItX.Send("^v");

            AutoItX.MouseMove(elementPossitionX + 100, elementPossitionY + 70);
            AutoItX.MouseDown();
            AutoItX.MouseUp();

            Thread.Sleep(GetRandomDelay(100)); // stop to make sure the dropdown selected done
        }
コード例 #3
0
 public void DrawLine(int xStartCoordinate, int yStartCoordinate, int xEndCoordinate, int yEndCoordinate)
 {
     AutoItX.MouseClickDrag("LEFT", xCoordinateRefactor(xStartCoordinate), yCoordianteRefactor(yStartCoordinate), xCoordinateRefactor(xEndCoordinate), yCoordianteRefactor(yEndCoordinate));
 }
コード例 #4
0
 public int MouseClickDrag(string button, int x1, int y1, int x2, int y2, int speed = -1)
 {
     return(AutoItX.MouseClickDrag(button, x1, y1, x2, y2, speed));
 }
コード例 #5
0
 static public void dragMouseRight(int fromX, int fromY, int toX, int toY, int speed = 0)
 {
     AutoItX.MouseClickDrag("RIGHT", fromX, fromY, toX, toY, speed);
 }