我试图用鼠标模拟拖放。 目前鼠标移动到正确的位置,它甚至点击文件,但是当它转到下一点时似乎没有拖动文件?
这就是我所拥有的:
MouseOperations.SetCursorPosition(myPoints[0].X, myPoints[0].Y);
MouseOperations.MouseEvent(MouseOperations.MouseEventFlags.LeftDown);
Thread.Sleep(2000);
MouseOperations.SetCursorPosition(myPoints[1].X, myPoints[1].Y);
Thread.Sleep(2000);
MouseOperations.MouseEvent(MouseOperations.MouseEventFlags.LeftUp);
mouseOperations类在这里: