我目前正在实施一个自动程序,拾取WAKFU的草药种子。 我做了很多研究,差不多完成了。我遇到的唯一问题是点击鼠标。当我点击“收获图标”上的鼠标时,似乎鼠标忽略了收获图标并按下了地面,为此我的角色移动而不是收获点击WAKFU C#
请参考我上传的视频。
鼠标点击
public void MouseClickLeft()
{
int x = Cursor.Position.X;
int y = Cursor.Position.Y;
mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
}
public void MouseClickRight()
{
int x = Cursor.Position.X;
int y = Cursor.Position.Y;
mouse_event(MOUSEEVENTF_RIGHTDOWN, x, y, 0, 0);
mouse_event(MOUSEEVENTF_RIGHTUP, x, y, 0, 0);
}
Point point3 = new Point(points[0].X +60 , points[0].Y - 60);
LinearSmoothMove(point3, delayt);
MouseClickLeft();
请告诉我,如果你需要更多的代码。
谢谢!