Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Create book log via scripting

New Here ,
Nov 14, 2023 Nov 14, 2023

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.

91
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023
LATEST

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.
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines