Skip navigation
Currently Being Moderated

Has the ExtendScript documentation been updated for FrameMaker 11?

Aug 16, 2013 2:28 AM

I have Technical Communicator Suite 4, and would like to write a simple script to automate the create of HTML Help for a FrameMaker book file.to

 

(i.e. to automate the process of me opening the book file, and selecting File > Publish)

 

The Publish command is new for TCS4 / FM11, however, so I don't think it's documented in the FM10 material...

 

Within my script, I guess I need to know how to select values for the 4 drop-down fields in the Publish dialog? (i.e. Output type, source file, and path to the robohelp templates)

 
Replies
  • Currently Being Moderated
    Aug 16, 2013 4:05 AM   in reply to feline_1973

    Feline,

     

    Not all commands are available as methods, and I would expect the Publish command to be one of them.Some menu items are implemented as separate clients and can only be accessed through CallClient. But they will have to have a client calling mechanism implemented to respond, and you would have to know the syntax. And even then it might not work due to missing or incorrect info (or bugs in the callback mechanism). As an example, I tried to automate the conversion of files to structured FrameMaker and the one command I needed does not repond to the CallClient method (which is even used as the single example for CallClient in the documentation). Frustrating, to say the least.

     

    I am afraid you will not be able to get this working, unless somebody else on this forum knows how to call any arbitrary menu command from ExtendScript.

     

    Sorry if this sabotages your plans

     

    Jang

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2013 4:47 AM   in reply to feline_1973

    I will try to use my contacts at Adobe to find out how this could be done, if it can be done at all. I will post something as soon as I have found out what the status is. This issue has been on my radar since some time (with other commands) but I have not had a business incentive to dig down deeper yet. I'll see what I can do.

     

    Ciao

     

    Jang

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2013 6:02 AM   in reply to 4everJang

    feline,

     

    The scripting capabilities of FM are remarkable. It's possible that that you've found an instance where something is not easily done (or perhaps not possible), but I can assure you that just about anything else is possible. So, I'd hate for you to get a bad taste about FM scripting just due to this one issue.

     

    Jang,

     

    What client are you trying to invoke? Is it the Structure Generator on a single document? The documentation for structuring a single document has been wrong forever, so it will not work as currently advertised. If you have the right syntax, though, it works great. Here's an FDK code snippet for a document conversion that should show what you need, in case this was your issue:

     

    F_Sprintf(tempUChar, "INPUTDOCID %d", docId);

    F_ApiCallClient("Structure Generator", (StringT)tempUChar);

     

    F_Sprintf(tempUChar, "RULEDOCID %d", convTableId);

    F_ApiCallClient("Structure Generator", (StringT)tempUChar);

     

    F_Sprintf(tempUChar, "OUTPUTDOCNAME %s", tempPath);

    F_ApiCallClient("Structure Generator", (StringT)tempUChar);

         

    F_ApiCallClient("Structure Generator", "StructureDoc");

     

    I believe the error in the manual is that is says to call "GenerateDoc" at the end, which is wrong and does nothing.

     

    I remember in the past working with someone trying to structure a book and I'm not sure if we ever got that working. Maybe that was you... sorry if I forgot

     

    Russ

     

    Message was edited by: Russ Ward

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 16, 2013 6:06 AM   in reply to Russ Ward

    Hi Russ,

     

    I agree with you about the scripting capabilities of FM, which is why I love the work I am currently doing. It does get a little complicated every now and then, but in the end I have usually emerged as the winner in any battle with FM, and mainly with its lacking documentation.

     

    Thanks for the code snippet. I will test to see if it works for me, too. The example shown in the FDK reference did not.

     

    Ciao

     

    Jang

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 21, 2013 7:47 AM   in reply to feline_1973

    Feline,

     

    Have you tried approaching this from RoboHelp instead? You can pull a FrameMaker document into a RoboHelp project by reference, meaning it is updated every time you open the project (possibly a refresh is required). The File > Publish from FM works through RH, so you would tap into the same publication track.

     

    I know RH can be scripted, but I have not done anything in that area yet. Still, it could be worth looking at the documentation for RoboHelp Scripting to find out whether the proposed route would be feasible for you.

     

    I am not someone to give up easily, as you may notice. :-)

     

    Good luck

     

    Jang

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points