public static void clickGame(int x, int y, bool doubleClick = false) { //AutoControl.SendClickOnPosition(Global.mainHandle, x, y); AutoControl.SendDragAndDropOnPosition(Global.mainHandle, x, y, x + 2, y + 2, 10, 10, 0.2); if (doubleClick) { //AutoControl.SendClickOnPosition(Global.mainHandle, x, y); AutoControl.SendDragAndDropOnPosition(Global.mainHandle, x, y, x + 2, y + 2); } }
public static void clickRandomArea(int x1, int y1, int x2, int y2, bool doubleClick = false) { int _x = GameRandom.RandomNumber(x1, x2); int _y = GameRandom.RandomNumber(y1, y2); AutoControl.SendDragAndDropOnPosition(Global.mainHandle, _x, _y, _x + 1, _y + 1, 10, 10, 0.2); //AutoControl.SendClickOnPosition(Global.mainHandle, _x, _y); if (doubleClick) { AutoControl.SendDragAndDropOnPosition(Global.mainHandle, _x, _y, _x + 1, _y + 1); //AutoControl.SendClickOnPosition(Global.mainHandle, _x, _y); } }
public static void clickImage(Bitmap image, int x, int y, string imageName = "image", bool doubleClick = false) { /*int _x = GameRandom.RandomNumber(x, x + 5); * int _y = GameRandom.RandomNumber(y, y + 5); * int _x2 = GameRandom.RandomNumber(x, x + 10); * int _y2 = GameRandom.RandomNumber(y, y + 10);*/ //AutoControl.SendClickOnPosition(Global.mainHandle, x, y, EMouseKey.LEFT); AutoControl.SendDragAndDropOnPosition(Global.mainHandle, x, y, x + 1, y + 1, 10, 10, 0.2); if (doubleClick) { AutoControl.SendDragAndDropOnPosition(Global.mainHandle, x, y, x + 1, y + 1); //AutoControl.SendClickOnPosition(Global.mainHandle, x, y, EMouseKey.LEFT); GameHelper.Log("Double Clicked to " + imageName); } else { GameHelper.Log("Clicked to " + imageName); } }
public static void swipeToNextExplore() { GameHelper.Log("Swipe"); AutoControl.SendDragAndDropOnPosition(Global.mainHandle, 1077, 85, 385, 83, 10, 10, 0.01); GameHelper.Delay(1230); }
public static void dragAndDropGame(int x1, int y1, int x2, int y2, int stepx = 10, int stepy = 10, double delay = 0.05) { AutoControl.SendDragAndDropOnPosition(Global.mainHandle, x1, y1, x2, y2, stepx, stepy, delay); }