Copy link to clipboard
Copied
Can I launch a batch file at the end of a RoboHelp script?
Copy link to clipboard
Copied
Aha, there's an example in C:\Program Files (x86)\Adobe\Adobe RoboHelp 9\RoboHTML\presets\scripts\ePub Generator.jsx:
function OnOpenZipURLInBrowserClick() {
var tempFolder = Folder.temp;
var batchFile = new File(tempFolder.fsName + "\\2C19034A-F44E-41af-BF3A-10879747CB24.bat"); //temp file name
var strCommand = "start http://stahlforce.com/dev/zip.exe \nexit";
writeToFile(batchFile.fsName, strCommand, false);
//run this batch file to open the URL in browser
batchFile.execute();
}
Copy link to clipboard
Copied
That example is so complicated I can't figure out how to adapt it.
Is there some way to execute an existing batch file with a single command, something like "c:\\test\\test.bat".execute()? I can't find any documentation on execute().
Copy link to clipboard
Copied
Aha, fileObj.execute() is documented here:
So how do I specify fileObj is an existing batch file?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now