Skip to main content
Jared Hess
Legend
January 6, 2021
Question

RoboHelp 2017 Script to A-Z sort TOC?

  • January 6, 2021
  • 4 replies
  • 236 views

I've done some RH scripting several years ago and wanted to get back into it to try and alphabetize a test TOC (.hhc) we use for testing modified topics in our help prior to sending our help off for localization.

 

I don't know if such a thing is even possible though.

Has anyone ever created a script to do this?

 

I did get ExtendScript working inside of my Visual Studio Code environment by installing the ExtendScriptDebugger extention and started creating a script. My script connects to RH, and I can count the number TOCs in the project and spit that number out to the output window. But that's about it as far as TOC operations. The methods or properties for doing any sort of automated TOC work seem sorely limited. But maybe I'm doing it the wrong way and am supposed to use different objects/methods?

 

I also can't find any good (current) documentation on RH scripting, other than this very limited documentation from RoboHelp 10:

https://help.adobe.com/en_US/robohelp/scripting/robohelp_10_scripting.pdf

 

Is there something more current for RH 2017, or is this RH 10 resource the latest?

    This topic has been closed for replies.

    4 replies

    Jared Hess
    Legend
    January 7, 2021

    Thanks Amebr and Peter. With so little information from official Adobe sources on scripting, any info is welcome.

     

    For now, I found a different and easier way of alphabetizing our test TOC. We create our test TOC from a .csv file of modified topics. It was a relatively simple matter to sort that .csv file.

    Peter Grainge
    Community Expert
    Community Expert
    January 7, 2021

    I can't help with 2017 but I can give you some information about 2020 that will help going forward.

     

    1. In 2020 ExtendScript is no longer used. 2020 uses Javascript. Scripts (grainge.org)
    2. The TOC file is XML. I wonder if that will be easier to alphabetise?
    3. There is now a Translations tool. Translations (grainge.org)

    ________________________________________________________
    See www.grainge.org for free Authoring and RoboHelp Information

    Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    Community Expert
    January 7, 2021

    Oh and there's this thing which I think Willam put together. Not sure if it contains anything helpful but worth a look.

     

    http://extendscript.helpessentials.com

    Community Expert
    January 7, 2021

    As far as I'm aware, that's the latest and most comprehensive guide available until the New UI scripting guide, which exhibits even more, um, brevity...

     

    I tend to find the Object Model Viewer available in ESTK more helpful, frankly. If you look under the Core Javascript Classes, maybe you can figure out something there. (Perhaps the XML class can be smooshed with the TOC class, I dunno...)