void ScriptRunner() { try { Script(); } catch (ThreadAbortException) { // Script stopped by user } catch (ScriptExitException e) { ScriptExit?.Invoke(e.Message); AutomataApi.ShowMessageBox("Script Exited", e.Message); } catch (Exception e) { LogError(e); ScriptExit?.Invoke(e.Message); AutomataApi.ShowMessageBox("Unexpected Error", e.ToString()); } }
public void Highlight(TimeSpan Duration) { AutomataApi.Highlight(this, Duration); }
public IPattern GetPattern() => AutomataApi.GetCopy(this);
public bool Exists(IPattern Image, int?Timeout = null, double?Similarity = null) => AutomataApi.Exists(this, Image, Timeout, Similarity);
public void WaitVanish(IPattern Image, int?Timeout = null) => AutomataApi.WaitVanish(this, Image, Timeout);
static bool LogError(Exception E) { AutomataApi.WriteDebug(E.ToString()); return(false); }