public override bool Play(ESRPlayer player) { //Waiting player.WaitingPlaying(this); //Action Point pt = AUtil.ToMouseSimulatorPoint(this.Point); GM.Instance.InputSimulator.Mouse.MoveMouseTo(pt.X, pt.Y); if (this.Button == ButtonType.Left) { GM.Instance.InputSimulator.Mouse.LeftButtonClick(); } else { GM.Instance.InputSimulator.Mouse.RightButtonClick(); } foreach (var item in this.ChildItems) { MouseClickRecorderItem mouseItem = item as MouseClickRecorderItem; if (mouseItem == null) { continue; } if (!player.IsThreadEnable) { return(false); } //Waiting player.WaitingPlaying(item); //Action if (this.Button == ButtonType.Left) { GM.Instance.InputSimulator.Mouse.LeftButtonClick(); } else { GM.Instance.InputSimulator.Mouse.RightButtonClick(); } } return(true); }
public override bool Play(ESRPlayer player) { //Waiting player.WaitingPlaying(this); //Action Point pt = AUtil.ToMouseSimulatorPoint(this.Point); GM.Instance.InputSimulator.Mouse.MoveMouseTo(pt.X, pt.Y); if (this.Dir == Dir.Down) { if (this.Button == ButtonType.Left) { GM.Instance.InputSimulator.Mouse.LeftButtonDown(); } else if (this.Button == ButtonType.Right) { GM.Instance.InputSimulator.Mouse.RightButtonDown(); } else if (this.Button == ButtonType.Wheel) { GM.Instance.InputSimulator.Mouse.MiddleButtonDown(); } } else { if (this.Button == ButtonType.Left) { GM.Instance.InputSimulator.Mouse.LeftButtonUp(); } else if (this.Button == ButtonType.Right) { GM.Instance.InputSimulator.Mouse.RightButtonUp(); } else if (this.Button == ButtonType.Wheel) { GM.Instance.InputSimulator.Mouse.MiddleButtonUp(); } } return(true); }
public override bool Play(ESRPlayer player) { //Waiting player.WaitingPlaying(this); //Action Point pt = AUtil.ToMouseSimulatorPoint(this.Point); GM.Instance.InputSimulator.Mouse.MoveMouseTo(pt.X, pt.Y); foreach (var item in this.ChildItems) { if (!player.IsThreadEnable) { return(false); } //Waiting player.WaitingPlaying(item); //Action pt = AUtil.ToMouseSimulatorPoint(item.Point); GM.Instance.InputSimulator.Mouse.MoveMouseTo(pt.X, pt.Y); } return(true); }