public static void Main(string[] args) { Win32Control control = new Win32Control(); Mouse mouse = new HumanMouse(control); RandomClicker clicker = new RandomClicker(new Point(control.DisplayWidth, 0), mouse); clicker.click(); clicker.click(); }
public static void Main(string[] args) { DeviceControl device = new Win32Control(); Thread.Sleep(5 * 1000); Replayer replayer = new Replayer(device); replayer.Replay(new ReplayBubbles()); Thread.Sleep(5 * 1000); }
public static void Main(string[] args) { Log.SetLevel(Log.Level.FINEST); Thread.Sleep(5000); Dictionary <string, string> config = BotAppLogic.ReadConfig(); Win32Control ctrl = new Win32Control(); TableOpener opener = new TableOpener(ctrl, new HumanMouse(ctrl), new Keyboard(ctrl), new TableIdentifier(new TableLayout9())); Settings settings = new Settings(); settings.AutoLocateTablesNum = 1; opener.OpenNewTables(settings, ImageRendererForm.newImageRendererForm()); Thread.Sleep(3000); opener.SitIn(); }
public static void Main(string[] args) { Thread.Sleep(10 * 1000); LobbyIdentifier identifier = new LobbyIdentifier(); DeviceControl device = new Win32Control(); Image screenshot = new ScreenImageIterator(device).next(); Point offset = PatternLocator.locateLobby(screenshot); LobbyLayout layout = new LobbyLayout(); Image window = screenshot.crop(offset.X, screenshot.width, offset.Y, screenshot.height); Image tableList = window.crop(layout.TableList.X, layout.TableList.X + layout.TableList.Width, layout.TableList.Y, layout.TableList.Y + layout.TableList.Height); List <LobbyTable> lobbyTables = identifier.identifyLobbyTables(tableList, offset); foreach (LobbyTable lobby in lobbyTables) { Console.WriteLine(lobby.ToString()); } }
private void DisableMouseIntegration(string name, int screenWidth, int screenHeight) { IntPtr hwnd = User32.FindWindowByCaption(IntPtr.Zero, name + " [Running] - Oracle VM VirtualBox"); if (hwnd == IntPtr.Zero) { hwnd = User32.FindWindowByCaption(IntPtr.Zero, name + " [wird ausgeführt] - Oracle VM VirtualBox"); } if (hwnd == IntPtr.Zero) { throw new Exception("Cannot locate VM window"); } User32.MoveWindow(hwnd, 0, 0, screenWidth, screenHeight, false); Thread.Sleep(1 * 1000); Win32Control control = new Win32Control(); control.MouseMoveTo(45, 45); control.MouseLeftClick(); Thread.Sleep(1 * 1000); control.MouseMoveTo(45, 160); control.MouseLeftClick(); }