My thoughts as a technical writer who writes scripts to automate documentation tasks

Menu

Monthly Archives: April 2013

In TCS2, this code that sets the second TOC as the default and then deletes the first TOC worked consistently.

if (RoboHelp.project.TOCManager.item(2).setAsDefault()) {

RoboHelp.project.TOCManager.item(1).delete();

}

In TCS4, the same code sometimes crashed the script, so I had to add this code close and then reopen the project, and then check whether the TOC that I’m trying to delete is the default, before deleting the old TOC. I suspect inserting a delay would achieve the same thing – if you try it and it works, let me know.