Copy link to clipboard
Copied
Hi,
is it possible to write a script where a book (error) log or something similar can be created? For example, after you update the book on FrameMaker, there is always a new tab/window popping up where a list of errors is displayed. I was trying to find a method or function in the FrameMaker scripting documentation but I didn't succeed.
Copy link to clipboard
Copied
Here is some sample code that shows how it is done:
#target framemaker
var doc, pgf, msg;
// Get the active document and the selected paragraph.
doc = app.ActiveDoc;
pgf = doc.TextSelection.beg.obj;
// Make an message to display.
msg = "This is a " + pgf.Name + " paragraph.";
// Show the book error log with the message.
writeBookErrorLog (pgf.id, doc.id, 0, msg);
function writeBookErrorLog (objId, docId, bookId, msg) {
msg = 'log -b=' + bookId + ' -d=' + docId + ' -o=' + objId + ' --' + msg;
CallClient ('BookErrorLog', msg);
return msg; // Return for troubleshooting.
}