5 Replies Latest reply on Oct 23, 2013 1:49 PM by Linus_Wang

    Is there a JS Script that could batch fm2mif and mif2fm?

    Linus_Wang

      I am using FrameMaker 10 now and want to use a Script that could save current opened files as mif or fm files (version could be selected).

      Like all open mif files to fm10 version or all fm files saving to mif7.

        • 1. Re: Is there a JS Script that could batch fm2mif and mif2fm?
          Russ Ward Level 4

          Linus,

           

          I'm sure an ExtendScript could do it. You would need to write it, though (or pay someone to). I highly doubt there is one floating around.

           

          Russ

          • 2. Re: Is there a JS Script that could batch fm2mif and mif2fm?
            frameexpert Level 4

            Hi Linus,

             

            I have a script like this. The cost for the script is $80 and includes the source code. If you are interested, please contact me offlist at rick at frameexpert dot com. Thanks.

             

            Rick

            FM2MIF2FM.png

            • 3. Re: Is there a JS Script that could batch fm2mif and mif2fm?
              4everJang Level 3

              Hi Linus,

               

              I created a script a while ago that uses either the active book or the active document as starting point, and includes optional conversion of any text inset files to the requested FM or MIF version or to text and optionally copying the images to a new subfolder. I used it to create final source copies of my manuals for my customers in the FM version that they are using. The inclusion of text insets and images (from a large pool of images I store locally on my drive) means the customer can re-create the entire book from what I hand them, without any missing components. Just zip the new directory and send it off. I have tested all the capabilties of FM10 and FM11 and all the listed versions should work.

               

              I am still working on an extension of the script that would check for incompatibilities when saving to an older FM format, Adobe just mentions that some features may get lost but does not actually check whether any of these features are included in your materials. I have not finished that part of the script yet, as that is quite a complex job to do, but without it you can get the script - without the source code - for free, if you promise to send me feedback. If you need the source code, we'll have to discuss a fair price for it.

               

              SaveLegacyDocs.gif

               

              So now you already have two options.

               

              Jang

              • 4. Re: Is there a JS Script that could batch fm2mif and mif2fm?
                Linus_Wang Level 1

                Hi Jang

                 

                Thank you for reply, I would like to test your script.

                But according to your screen capture, I don't find the options save mif files back to fm.

                And I don't want the script to be limited in a selection of book file.

                 

                Usually we save all fm files (could be only part of the books) to mif format and translate them with Trados, then save the translated mif files back to fm format.

                So dealing with all opened documents or files in a specific folder would be appropriate for me.

                • 5. Re: Is there a JS Script that could batch fm2mif and mif2fm?
                  Linus_Wang Level 1

                  Hi Jang

                  Thank you for reply on forum.

                  I replied on it and would like to try your script.

                  And for Fm2mif part, I searched all the discussions and extracted the following scripts which could make it.

                  I don't understand the references of scripting in FrameMaker very well, they look different from InDesign.

                   

                  MyDoc=app.FirstOpenDoc;

                  while (MyDoc.ObjectValid() === 1) {

                      name = MyDoc.Name;

                      fullName = name.replace(".mif",".fm");

                      var params = GetSaveDefaultParams()

                      var returnParamsp =new PropVals()

                      var i = GetPropIndex(params, Constants.FV_SaveAsNameProvided)

                      params[i].propVal.ival =Constants.FV_SaveNoAutoBackup

                      MyDoc.Save(fullName, params, returnParamsp)

                      MyDoc = MyDoc.NextOpenDocInSession;

                  }

                  CloseAll();

                  ....

                     ,_

                    >' )

                    ( ( \

                     ''|\

                  Linus Wang