Exemplo n.º 1
0
 /// <summary>
 /// IMacrosTest Constructor
 /// </summary>
 /// <param name="url">URL</param>
 /// <param name="initialApp">iMacros.App instance</param>
 /// <param name="macroDirectory">path to the directory hosting .iim macros to run</param>
 public ImacrosPlayer(App initialApp, string macroDirectory)
 {
     macroDirectoryPath = macroDirectory;
     filenames = Directory.EnumerateFiles(macroDirectoryPath);
     imacrosApp = initialApp;
     //Url = url; // remove?
     imacrosApp.iimInit(null, true, null, null, null);
 }
        public AcessoImacros(bool ocultaImacros)
        {
            iim = new iMacros.App();
            int timeout = 90;


            if (ocultaImacros)
            {
                // RODAR MACROS COM IMACROS INVISIVEL
                iMacros.Status status = iim.iimInit("-silent", true, timeout);
                instanciaImacros++;
            }
            else
            {
                iMacros.Status status = iim.iimOpen("", true, timeout);
                instanciaImacros++;
            }
        }
Exemplo n.º 3
0
 static public Status Run(string content, string fileId)
 {
     try
     {
         File.WriteAllText("D:/Files/mac" + fileId + ".iim", content);
         int            timeout = 60, errors = 0;
         iMacros.Status status;
         var            app = new iMacros.App();
         status = app.iimInit("-V7", true, "", "", "", timeout);
         if (status != iMacros.Status.sOk)
         {
             errors++;
         }
         string macro = "D:/Files/mac" + fileId + ".iim";
         status = app.iimDisplay("Interface version =\n" + app.iimGetInterfaceVersion().ToString(), timeout);
         if (status != Status.sOk)
         {
             return(status);
         }
         status = app.iimPlay(macro, timeout);
         if (status != Status.sOk)
         {
             return(status);
         }
         status = app.iimExit(timeout);
         if (status != Status.sOk)
         {
             return(status);
         }
         return(status);
     }
     catch (Exception)
     {
         throw;
     }
 }