public Form1() { InitializeComponent(); radioAPI.Checked = true; try { m_tCapture = ComFactory.Instance.NewTextCaptureX(); m_tSelection = ComFactory.Instance.NewTSelection(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private string TestOCR() { try { if (this.inPtr != IntPtr.Zero) { obj = new TextCaptureX(); return(obj.GetTextFromRect(this.inPtr.ToInt32(), Location.X + 20, Location.Y + 20, this.Width - 20, this.Height - 20)); } return(""); } catch (Exception ex) { return(""); } }
public Form1() { InitializeComponent(); comboClick.SelectedIndex = 0; comboMouseBtn.SelectedIndex = 0; try { m_tCapture = ComFactory.Instance.NewTextCaptureX(); m_tSelection = ComFactory.Instance.NewTSelection(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public Form1() { InitializeComponent(); try { m_tCapture = ComFactory.Instance.NewTextCaptureX(); m_tSelection = ComFactory.Instance.NewTSelection(); m_tOCRCapture = ComFactory.Instance.NewGetOCRText(); } catch (Exception ex) { MessageBox.Show(ex.Message); } // add mouse buttons comboMouseBtn.Items.Add("Left"); comboMouseBtn.Items.Add("Middle"); comboMouseBtn.Items.Add("Right"); comboMouseBtn.SelectedIndex = 0; // add click types comboClick.Items.Add("Single Click"); comboClick.Items.Add("Double Click"); comboClick.SelectedIndex = 0; //init OCR combos comboEngine.Items.Add("Tesseract"); comboEngine.SelectedIndex = 0; comboLang.Items.Add("eng"); comboLang.Items.Add("deu"); comboLang.Items.Add("ita"); comboLang.Items.Add("fra"); comboLang.Items.Add("nld"); comboLang.Items.Add("spa"); comboLang.SelectedIndex = 0; //select native capture radioNative.Checked = true; }
public Form1() { InitializeComponent(); try { m_tCapture = ComFactory.Instance.NewTextCaptureX(); m_tSelection = ComFactory.Instance.NewTSelection(); m_tFullTextCapt = ComFactory.Instance.NewGetAAText(); m_tOCRCapture = ComFactory.Instance.NewGetOCRText(); m_tCapture.UseClientCoordinates = true; m_tFullTextCapt.UseClientCoordinates = true; m_tOCRCapture.UseClientCoordinates = true; } catch (Exception ex) { MessageBox.Show(ex.Message); } // init radios radioNative.Checked = true; // init checkbox checkIDorHWND.Checked = true; // init OCR comboEngine.Items.Add("Tesseract"); comboEngine.SelectedIndex = 0; comboLang.Items.Add("eng"); comboLang.Items.Add("deu"); comboLang.Items.Add("ita"); comboLang.Items.Add("fra"); comboLang.Items.Add("nld"); comboLang.Items.Add("spa"); comboLang.SelectedIndex = 0; }