public bool Hook() { bool result; try { MainWindowAS = new AutoSpy(AutoSpy.GetHandle(HANDLE_TITLE, null), AutoSpy.GetControlHandle(HANDLE_TITLE, BlueStacks.CONTROL_HANDLE_TITLE)); Show(true); result = true; } catch (Exception) { result = false; } return(result); }
public bool RestartAndroid() { try { AutoSpy autoSpy = new AutoSpy(AutoSpy.GetHandle(BlueStacks.HANDLE_TITLE, null), AutoSpy.GetControlHandle(BlueStacks.HANDLE_TITLE, BlueStacks.SETTINGS_HANDLE_TITLE)); autoSpy.FocusWindow(); autoSpy.Click(16, 9, 1, 0, "left"); autoSpy.PressKey(40u, 2, 100); autoSpy.PressKey(13u, 1, 100); } catch (Exception) { return(false); } return(this.Hook()); }
public bool Hook() { bool result; try { this.MainWindowAS = new AutoSpy(AutoSpy.GetHandle(BlueStacks.HANDLE_TITLE, null), AutoSpy.GetControlHandle(BlueStacks.HANDLE_TITLE, BlueStacks.CONTROL_HANDLE_TITLE)); this.SideMenuAS = new AutoSpy(AutoSpy.GetHandle("", BlueStacks.SIDE_MENU_HANDLE_TITLE)); this.Show(true); result = true; } catch (Exception) { result = false; } return(result); }