12 Replies Latest reply on Apr 24, 2012 10:07 AM by rlauriston

    master ExtendScript to run FrameMaker and RoboHelp scripts?

    rlauriston Level 1

      I'm trying to automate generation of PDF in FrameMaker 10 and WebHelp from the same source in RoboHelp 9.


      I have two scripts that are working, now I'm trying to run them as a single script.


      Looking at a discussion about InDesign scripting (http://forums.adobe.com/thread/776832), I thought maybe the following would work:


      robohelp.executeScriptFile("c:\\Users\\rlauriston\\Documents\\help_automation\\2_robohelp. jsx")


      but when I debug it in ExtendScript Toolkit CS5.5, I get "robohelp is undefined".


      Reading Adobe Creative Suite 5 JavaScript Tools Guide, I get the impression that this should work:



      var projectPath = "C:\\Users\\rlauriston\\Documents\\My RoboHelp Projects\\AG\\SentrionAdminGuide.xpj";


      function main()


              if(projectPath == "")


                     //Error!. Quit RoboHelp

                     alert("Project path is not defined. \nPlease update the 'projectPath' variable in the script.");



              RoboHelp.openProject(projectPath); //Open the project

              RoboHelp.project.updateAll(true); //Update all linked documents (pass true for Force update)

                RoboHelp.closeProject(); //Close project

              RoboHelp.quit(); //Quit RoboHelp




      but when I debug it I get "Illegal use of reserved word 'var'". If I move the var declaration to the top of the file, I get "Expected: )" on the semicolon after main().