public static bool TextExists2(string processName, string phrase)
        {
            Stopwatch st = Stopwatch.StartNew();

            Bitmap capture = ApplicationCapture.CaptureApplication(processName);

            Page page = Engine.Process(capture);

            string text = page.GetText();

            capture.Dispose();


            page.Dispose();

            return(text.Contains(phrase));
        }
Beispiel #2
0
        public static bool TextExists2(string processName, string phrase)
        {
            Stopwatch st = Stopwatch.StartNew();

            Bitmap capture = ApplicationCapture.CaptureApplication(processName);

            Page page = Engine.Process(capture);

            string text = page.GetText();

            capture.Dispose();

            Logger.Write("Text recognition performed in " + st.ElapsedMilliseconds + "ms");

            page.Dispose();

            return(text.Contains(phrase));
        }
 private static Bitmap GetCapture()
 {
     return(ApplicationCapture.CaptureApplication("League of Legends"));
 }