Exemplo n.º 1
0
        public Window runOp(Window hWnd)
        {
            AutoItX3Lib.AutoItX3Class au3 = new AutoItX3Lib.AutoItX3Class();

            string doc = settings["open"];
            string[] str = doc.Split('\\');
            string name = settings["app_name"] + ":" + settings["app_instance"];

            string title = str[str.Length - 1];

            au3.Opt("WinTitleMatchMode", 2);
            au3.Opt("SendKeyDelay", 20);
            au3.Send("^o", 0);
            while (true)
            {
                if (au3.WinExists("Open", "") != 0) { break; }
            }
            au3.Sleep(1000);
            au3.Send(doc, 0);
            au3.Send("{ENTER}", 0);
            Time.startTimer(name, "open");

            while (true)
            {
                if (au3.WinExists(title, "") != 0) { break; }
            }

            Time.stopTimer(name, "open");
            return hWnd;
        }
Exemplo n.º 2
0
Arquivo: Run.cs Projeto: cquinlan/USBT
        public Window runOp(Window hWnd)
        {
            AutoItX3Lib.AutoItX3Class au3 = new AutoItX3Lib.AutoItX3Class();

            string path = settings["app_path"];
            string[] str = path.Split('\\');
            string name = settings["app_name"] + ":" + settings["app_instance"];

            Process appProc = Process.Start(path);

            Time.startTimer(name, "launch to ready");
            Time.startTimer(name, "runtime");

            while (true)
            {
                if (au3.WinExists("Welcome to Adobe Premiere Pro", "").Equals(1)) { break; }
            }

            string handle = appProc.MainWindowHandle.ToString("x");

            Time.stopTimer(name, "launch to ready");

            hWnd.handle = handle;
            hWnd.myProc = appProc;
            return hWnd;
        }
Exemplo n.º 3
0
        public Window runOp(Window hWnd)
        {
            AutoItX3Lib.AutoItX3Class au3 = new AutoItX3Lib.AutoItX3Class();

            string path = settings["app_path"];
            string doc = settings["open"];
            string[] str = doc.Split('\\');
            string name = settings["app_name"] + ":" + settings["app_instance"];

            string title = str[str.Length - 1];

            Process appProc = Process.Start(path, Path.GetFullPath(settings["open"]));
            Time.startTimer(name, "launch to ready");
            Time.startTimer(name, "runtime");

            au3.Opt("WinTitleMatchMode", 2);
            while (true)
            {
                if (au3.WinExists(title, "") != 0) { break; }
            }

            string handle = appProc.MainWindowHandle.ToString();

            Time.stopTimer(name, "launch to ready");
            hWnd.handle = handle;
            hWnd.myProc = appProc;
            return hWnd;
        }
Exemplo n.º 4
0
Arquivo: Run.cs Projeto: cquinlan/USBT
        public Window runOp(Window hWnd)
        {
            AutoItX3Lib.AutoItX3Class au3 = new AutoItX3Lib.AutoItX3Class();

            string path = settings["app_path"];
            string[] str = path.Split('\\');
            string name = settings["app_name"] + ":" + settings["app_instance"];

            Process appProc = Process.Start(path);
            ps.ApplicationClass app = new ps.ApplicationClass();

            Time.startTimer(name, "launch to ready");
            Time.startTimer(name, "runtime");

            WaitForRedraw(app);
            while (true)
            {
                if (au3.WinExists("Adobe Photoshop", "").Equals(1)) { break; }
            }

            string handle = au3.WinGetHandle("Adobe Photoshop", "");

            Time.stopTimer(name, "launch to ready");

            hWnd.handle = handle;
            hWnd.myProc = appProc;
            return hWnd;
        }
Exemplo n.º 5
0
        public Window runOp(Window hWnd)
        {
            AutoItX3Lib.AutoItX3Class au3 = new AutoItX3Lib.AutoItX3Class();

            string path = settings["app_path"];
            string[] str = path.Split('\\');
            string name = settings["app_name"] + ":" + settings["app_instance"];

            Process appProc = Process.Start(path,Path.GetFullPath(settings["open"]));

            Time.startTimer(name, "launch to ready");
            Time.startTimer(name, "runtime");
            StreamReader read = hWnd.myProc.StandardOutput;
            appProc.WaitForInputIdle();

            string handle = appProc.MainWindowHandle.ToString();

            while (true)
            {
                if (au3.WinExists("Adobe Reader", "").Equals(1) & hWnd.myProc.Responding) { break; }
            }

            appProc.WaitForInputIdle();

            Time.stopTimer(name, "launch to ready");
            hWnd.handle = handle;
            hWnd.myProc = appProc;
            Console.WriteLine(read.ReadToEnd());
            return hWnd;
        }
Exemplo n.º 6
0
        public Window runOp(Window hWnd)
        {
            AutoItX3Lib.AutoItX3Class au3 = new AutoItX3Lib.AutoItX3Class();

            string doc = settings["save"];
            string[] str = doc.Split('\\');
            string name = settings["app_name"] + ":" + settings["app_instance"];
            string opName = settings["op_name"];

            string title = str[str.Length - 1];

            au3.Opt("WinTitleMatchMode", 4);
            au3.WinActivate("[HANDLE:" + hWnd.handle + "]", "");

            au3.Opt("WinTitleMatchMode", 2);
            au3.Opt("SendKeyDelay", 20);
            au3.Send("{F12}", 0);
            while (true)
            {
                if (au3.WinExists("Save As", "") != 0) { break; }
            }
            au3.Sleep(1000);
            au3.Send(doc, 0);
            au3.Send("{ENTER}", 0);

            if(au3.WinExists("[CLASS:bosa_sdm_Microsoft Office Word 12.0","").Equals(1))
            {
                au3.Send("{ENTER}", 0);
            }

            Time.startTimer(name , opName);

            au3.Opt("WinTitleMatchMode", 2);

            while (true)
            {
                au3.WinActivate(title, "");
                if (au3.WinActive(title, "") != 0) { break; }
            }

            hWnd.myProc.WaitForInputIdle();

            Time.stopTimer(name , opName);
            hWnd.handle = au3.WinGetHandle(title, "");
            hWnd.title = au3.WinGetTitle(title, "");
            return hWnd;
        }