7 Replies Latest reply: May 15, 2014 9:58 AM by CREISING _ RSS

    Using Autoscript vs. 8.0 Commands

    TomS _

      I recently upgraded to Monarch 8.0 Pro from 5.0. I use Autoscript extensively to run BAT files that open Monarch projects, export tables to multiple Excel files and then open those files in Excel. 

      I was surprised to see that Autoscript is no longer provided with an upgrade to 8.0.  It works very well for automating different processes. I talked to tech support to see what replaces it.  They said that the functionality of 8.0 is different and to put the commands in a desktop icon.  When I do this, it didn't work. When I put the BAT file as the name in the target in the desktop icon, it brings up a DOS screen and only executes the first line of the BAT file.

      So how do I get multiple command lines to work in 8.0?

      I am still using Autoscript which works perfectly and I don't know why Datawatch eliminated it.  Maybe they should consider adding it back to future releases.

       

      Thanks.

      TomS

         

        • Using Autoscript vs. 8.0 Commands
          Grant Perkins

          Tom,

           

          The official answer is   [url="http://mails.datawatch.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=000891#000000"]here[/url].

           

          Quite what light that may throw onto your problem I am not sure but I thought you might like to read it.

           

          Are you running a recent OS?

           

           

          Grant

           

          [size="1"][ May 02, 2006, 01:15 PM: Message edited by: Todd Niemi ][/size]

          • Using Autoscript vs. 8.0 Commands
            TomS _

            Hi Grant,

            I am running Windows XP, so that shouldn't be a problem.  So I still don't know how to convert a BAT file that was in Autoscript to an executable icon on the desktop.  If I put the BAT file as the target in a desktop icon, It shows the BAT file code in a DOS screen and then opens Monarch, but does nothing else.  Here is by BAT file called glbank.bat:

             

            cd F:BankRecDeptMonarch

            monarch projectsglbank.xprj f: ankrecdeptstaff     omexcel ankglinput.xls /t

            c:program filesmicrosoft officeoffice11excel.exe f: ankrecdeptstaff     omexcel ankmstrgl.xls

             

            The target in the desktop icon points to this file.  Any help is appreciated.

             

            Thanks.

            Tom S

               

            • Using Autoscript vs. 8.0 Commands
              Bruce _

              Tom

               

              Try changing

              cd F:BankRecDeptMonarch

              monarch projectsglbank.xprj f: ankrecdeptstaff     omexcel ankglinput.xls /t

              c:program filesmicrosoft officeoffice11excel.exe f: ankrecdeptstaff     omexcel ankmstrgl.xls

              /quoteto

              cd F:BankRecDeptMonarch

              monarch /prj:projectsglbank.xprj /exp:f: ankrecdeptstaff     omexcel ankglinput.xls /t

              c:program filesmicrosoft officeoffice11excel.exe f: ankrecdeptstaff     omexcel ankmstrgl.xls

              /quoteNote the /prj: and /exp: switches

               

              Monarch changed the syntax in version 6 or 7. Read the on line help, chapter 9, it was helpful for me. By the way if you still have autoscript around, you can still use in in XP & Monarch 8. However it is best to move to the new way as you will be able to use more commands.

               

              Good luck

                smile.gif[/img]

              • Using Autoscript vs. 8.0 Commands
                Grant Perkins

                Tom,

                 

                I think you need to review the parameters in the command lines for the Monarch part. I assume the Excel part will work - not something I have tried to do recently as automation is a tiny part of my usage and rather rare.

                 

                Best suggestion I think is to check out Chapter 9 of the Help files and then the last section of Chapter 8 which describes creating an icon on the desktop - but I think you are OK with that anyway and simply need to review you command lines in light of the new parameters.

                 

                My guess is that you know more about batch files than I do but if your problems persist let us know and one of the regular batch files users will undoubtedly offer some advice if my attempts don't help you to find the solution.

                 

                -


                 

                cd F:BankRecDeptMonarch

                monarch /prj:"F:BankRecDeptMonarchprojectsglbank.xprj" /exp:"f: ankrecdeptstaff     omexcel ankglinput.xls" /t

                 

                c:program filesmicrosoft officeoffice11excel.exe f: ankrecdeptstaff     omexcel ankmstrgl.xls

                 

                -


                 

                 

                That or something close to it should do what you want. However, if you used a Project Export you can also simply specify which Export Job you want to happen using the /px:[Name]  parameter or run all Exports with /pxall:

                 

                Many of the examples offered assume Monarch is understood on your susytem as a global variable 'Monarch' which would remove the need for the initial cd line in your batch file.

                 

                I aso tend to use the full path for each part of the command line in order to make the path always explicit but that is a matter of personal preference I think. Relative references should still work as far as I know.

                 

                I hope this helps.

                 

                Grant.

                • Using Autoscript vs. 8.0 Commands
                  TomS _

                  Grant and Bruce,

                  Thanks for your input.  I tried what you suggested, but got the same results.  It opens Monarch and then just stops.  So it suddenly occurred to me:  How does Windows command.exe batch file execution program know how to execute Monarch commands?  It doesn't!!!  So I am still trying to figure out how people are executing BAT commands outside of Monarch Autoscript.  I rewrote the commands in straight command language and it works.  Here is what I wrote.

                   

                  cd C:program filesMonarchprogram

                  start /w monarch.exe "F:BankRecDeptMonarchprojectsglbank.xprj" /exp:f: ankrecdeptstaff     omexcel ankglinput.xls /t

                  cd C:program filesmicrosoft officeoffice11

                  excel.exe "f: ankrecdeptstaff     omexcel ankmstrgl.xls"

                   

                  I don't want to rewrite all this extra code for the same results, so I guess I will continue to use Autoscript.  If there is an easier way, let me know.

                   

                  Thanks.

                  TomS

                     

                  • Using Autoscript vs. 8.0 Commands
                    mclark _

                    Tom,

                    When we upgraded to V8, we had 2 computers that were running Monarch Automated jobs. One continued to work fine with autoscrp but the other did not. Our fix was actually what we entered in the Windows Scheduler run line. We went from putting:

                     

                    C:WhereverAutoscrp.exe P:

                    ameoffile.bat

                    to

                    "P:

                    ameoffile.bat"

                     

                    The quotes seemed to make DOS less confused. Use this in conjuction with the latest command line parameters and let me know if it works for you.

                     

                    Good Luck  :rolleyes:

                    • Using Autoscript vs. 8.0 Commands
                      CREISING _

                      I have used icons and autoscrpts for several years.  For the target, I have always enclosed the executable as well as the BAT file info in double quotes.  Each separately, so there are 2 sets of double quotes.  I have not upgraded to Monarch ver 8, so can not speak to that.

                       

                      Target: "C:Program FilesMonarchProgramAutoscrp.exe"  "C:Documents and SettingsxxxxxReconRecon.bat"