public static void CloseChatAndOpenWindows(this IRenderController renderController) { if (renderController.IsUiElementVisible(UiPathConstants.Ui.CHAT_INPUT)) { InputSimulator.PressKey(Keys.Escape); WaitForConditionOrAbortHotkeyEvent(() => !renderController.IsUiElementVisible(UiPathConstants.Ui.CHAT_INPUT)); } InputSimulator.PressKey(Settings.Keybinds[(int)ActionKey.Close]); Thread.Sleep(25); }
public static void WaitForVisiblityAndClickOrAbortHotkeyEvent(this IRenderController renderController, string path, int maxWaitTimeMs = 2000, int intervalMs = 25, bool leftClick = true) { WaitForConditionOrAbortHotkeyEvent(() => renderController.IsUiElementVisible(path), maxWaitTimeMs, intervalMs); if (leftClick) { renderController.GetOrRegisterAndGetUiElement(path).Click(); } else { renderController.GetOrRegisterAndGetUiElement(path).RightClick(); } }
public static bool IsShopOpen(this IRenderController renderController) { return(renderController.IsUiElementVisible(UiPathConstants.Vendor.CURRENCY_TYPE)); }