public static bool MouseDrag(int nX1, int nY1, int nX2, int nY2, int nSpeed = -1, string Button = "LEFT") { Logger.Info("Dragging mouse from [{0},{1}] to [{2},{3}]", nX1, nY1, nX2, nY2); Point pos = GetRectangle().Location; return(AutoIt3Wrapper.MouseClickDrag(Button, pos.X + nX1, pos.Y + nY1, pos.X + nX2, pos.Y + nY2, nSpeed) == 1); }
public static bool MouseClick(string Button = "LEFT", int nX = -2147483647, int nY = -2147483647, int nClicks = 1, int nSpeed = -1) { Logger.Info("Sending mouse click to [{0},{1}]", nX, nY); Point pos = GetRectangle().Location; return(AutoIt3Wrapper.MouseClick(Button, pos.X + nX, pos.Y + nX, nClicks, nSpeed) == 1); }
public static bool SetPosition(int x, int y) { Logger.Info("Settings position to {0},{1}", x, y); return(AutoIt3Wrapper.WinMove(Process.MainWindowTitle, "", x, y) == 1); }
public static bool Send(string strText, int nMode = 0) { Logger.Debug("Sending \"{0}\""); return(AutoIt3Wrapper.ControlSend(Process.MainWindowTitle, "", "", strText, nMode) == 1); }
public static Color GetPixelColor(int x, int y) { Point pos = GetRectangle().Location; return(Color.FromArgb(AutoIt3Wrapper.PixelGetColor(pos.X + x, pos.Y + y))); }
public static bool MouseDown(string Button = "LEFT") { Logger.Info("Mouse down"); return(AutoIt3Wrapper.MouseDown(Button) == 1); }