Skip to main content
K.Daube
Community Expert
Community Expert
September 6, 2021
Question

An ExtendScript library for FrameMaker

  • September 6, 2021
  • 2 replies
  • 705 views

Dear friends and experts,

Many of you have helped me when I was stuck in a scripting problem. Even if my script suites (FMbiblio, FMcalc, FMfindRepl, FMgraph, FMnotes and FMvars) are not used that much (besides myself), this work built up my knowledge and function library.

I share this library with you on https://www.daube.ch/docu/fmaker88.html 
A complete documentation is on https://www.daube.ch/docu/files/FMjsxLib.pdf 

Since not much of this work was really just out of my head, most functions refer to a knowledge source in the comment header:

 

KLD_Z.FindAndReplaceString = function (oDoc, sFind, sReplace, loopMax) {
/* In the active document replace a string by another one (all occurrences)
Arguments     oDoc       Document to be handled,.
              sFind      String to be found and replaced
              sReplace   String for replacement
              loopMax    emergency back door - number of maximum expected 
                         finds(will be doubled here)
Returns       Count of replacements
Calling       GetFindParameters, InitFA_errno
Comment       Function operates only on MainFlowInDoc. There is no initial
              TextSelection, hence start directly at the first paragraph.
Reference     Russ Ward in https://forums.adobe.com/thread/895626 
              and Rick Quatro
Used in       FMbiblio
*/

 

I hope this avoids plagiarism accusations ...

My programming style may be considered archaic or at least conservative. For example, I can not fully understand, what is discussed on https://community.adobe.com/t5/indesign-discussions/extendscript-libraries/m-p/4653285#M200725  ... I will never understand, why 'they' are talking about classes when there is the term function since aeons...

Comments about the project are welcome.
Klaus

This topic has been closed for replies.

2 replies

K.Daube
Community Expert
K.DaubeCommunity ExpertAuthor
Community Expert
March 17, 2022

Thanks to Rick's goodwill I can significantly update the documentaion by chapter Automation with ExtendScript. Other changes for version 1.2 are:

  • Corrected: FindAndReplaceString
  • New functions: ApplyMasterPages, CnvBookToStruct, CnvDocToStruct, ExistFile, ExistFolder, GenerateConversionTable, GetBookErrorLogDoc, ListBookFiles, OptimisePDFsize, Publishing, SortTable, UpdateConversionTable, ValidateDoc, WriteBookErrorLog

See daube.ch/docu/fmaker88.html

frameexpert
Community Expert
Community Expert
September 7, 2021

Thank you Klaus. I did get your email about the book code, but I haven't found it yet. It is on an older machine. Thanks for all of your efforts and contributions over the years. -Rick