0
Create book log via scripting
New Here
,
/t5/framemaker-discussions/create-book-log-via-scripting/td-p/14233253
Nov 14, 2023
Nov 14, 2023
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/framemaker-discussions/create-book-log-via-scripting/m-p/14233345#M81765
Nov 14, 2023
Nov 14, 2023
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.
}
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more