Highlighted

ExtendScript: Import HTML File returns false

New Here ,
Jul 25, 2018

Copy link to clipboard

Copied

Hey,

I am new in using ExtendScript. I have to convert an old documentaion to RoboHelp and i wanted to use scripts for that. But acutally i am stucking at import a HTML file. I use the method Project.importHtmlFile (see my code below) and the script throws no error. But the file will not imported in the project and the method returns false (see my console output below).

Has anyone an idea, what i am doing wrong? Or is there a way to get more informaiton about the fail?

Script

var project = RoboHelp.getCurrentProject();

var result = project.importHtmlFile ("C:\Users\kgr\Desktop\RoboHelpTest\Zweites_Thema.html", "Test");

$.writeln("Import Result: " + result);

currentProject.saveAll (true);

Output

Import Result: false

Result: true

Project

Topics

HTML

Views

216

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ExtendScript: Import HTML File returns false

New Here ,
Jul 25, 2018

Copy link to clipboard

Copied

Hey,

I am new in using ExtendScript. I have to convert an old documentaion to RoboHelp and i wanted to use scripts for that. But acutally i am stucking at import a HTML file. I use the method Project.importHtmlFile (see my code below) and the script throws no error. But the file will not imported in the project and the method returns false (see my console output below).

Has anyone an idea, what i am doing wrong? Or is there a way to get more informaiton about the fail?

Script

var project = RoboHelp.getCurrentProject();

var result = project.importHtmlFile ("C:\Users\kgr\Desktop\RoboHelpTest\Zweites_Thema.html", "Test");

$.writeln("Import Result: " + result);

currentProject.saveAll (true);

Output

Import Result: false

Result: true

Project

Topics

HTML

Views

217

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Amebr LATEST
Adobe Community Professional ,
Jul 25, 2018

Copy link to clipboard

Copied

Maybe import the file manually and see if that's successful. If it doesn't import, the log might show you what's going wrong so you can fix it in your script.

And have a look at the sample scripts Adobe provides. There's one called Master Page Import.jsx that might help.

(By the way, most of us aren't coders here, so we probably can't give you much help script-wise.)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...