private void tmrMonkey_Tick(object sender, System.EventArgs e) { tmrMonkey.Interval = (int)numInterval.Value * 1000; Random rnd = new Random(); int x = rnd.Next(); int y = rnd.Next(); MouseAPI.MoveMouse(this.Handle.ToInt32(), x, y); MouseAPI.ClickMouse(MonkeyButtons.btcLeft, 0, 0, 0, 0); }
private void tmrMonkey_Tick(object sender, System.EventArgs e) { tmrMonkey.Interval = (int)numInterval.Value * 1000; Random rnd = new Random(); int x = rnd.Next(); int y = rnd.Next(); smtInfo.Append(x + ", " + y + ", "); MouseAPI.MoveMouse(this.Handle.ToInt32(), x, y); MouseAPI.ClickMouse(MonkeyButtons.btcRight, 0, 0, 0, 0); MouseAPI.ClickMouse(MonkeyButtons.btcLeft, 0, 0, 0, 0); MouseAPI.ClickMouse(MonkeyButtons.btcWheel, 0, 0, x % 2000, 0); int wHdl = 0; StringBuilder clsName = new StringBuilder(128); StringBuilder wndText = new StringBuilder(128); MouseAPI.GetSmartInfo(ref wHdl, ref clsName, ref wndText); smtInfo.Append(wHdl + ", " + clsName.ToString() + ", " + wndText.ToString() + "\n"); }