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

Has the ExtendScript documentation been updated for FrameMaker 11?

Explorer ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

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)

TOPICS
Scripting

Views

1.6K

Translate

Translate

Report

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
Explorer ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

I'm in the ExtendScript Toolkit CS6 Object Model Viewer...

I've got the Book object selected... am I right in thinking that the "Properties and Methods" window then shows me what "methods" I can use with a Book object?
(And that these more or less correspond with menu items in the FrameMaker GUI?)
Because I don't see a method I can use with a Book that corresponds to File > Publish?  (Unless it's the Export method?  Or is that corresponding to Save As?)

Votes

Translate

Translate

Report

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
Advocate ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Explorer ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

Thanks Jang

I thought the whole idea with this Framemaker Scripting was "You can write a script to do anything you can do in the FrameMaker GUI" ... i.e. if you can click on it, you can script it! Thanks how the seminars sell it. Maybe they're being a bit optimistic

I'm having a rummage in the FDK 11 documents too... there is a "what's new in FM11" section, but I don't see anything mentioned for that Publish command.

Basically, what my manager has said they would like to happen is:
I check my frameMaker files into their software build system, and we have a script to auto-generate .chm files for the HTML Help.

I thought I'd be able to do this if I could write a simple script which basically is just a macro of be opening a book and clicking File > Publish...    ? 

Votes

Translate

Translate

Report

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
Advocate ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Mentor ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Advocate ,
Aug 16, 2013 Aug 16, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Explorer ,
Aug 21, 2013 Aug 21, 2013

Copy link to clipboard

Copied

Well, it looks like I will give up on the idea of controlling this with a script. The documentation to enable me to work out how to do it just isn't there, and I haven't time to figure it out.
But thanks everyone for the all the posts above, which were very helpful in letting me quantify the known unknowns

Votes

Translate

Translate

Report

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
Advocate ,
Aug 21, 2013 Aug 21, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Explorer ,
Aug 21, 2013 Aug 21, 2013

Copy link to clipboard

Copied

LATEST

Jang,

this is exactly what one of the other Tech Writers here suggested I try (scripting RoboHelp instead of Frame)! 
I just thought it would be easier to script it from Frame, because the new 'Publish' command for Technical Comm Suite 4 is designed to let you do this with a single click in a single dialog ...   so I thought the corresponding script would be simple too.

However, it doesn't look like scripting this is a mandatory requirement for the project I'm working on, they're happy for me to generate .CHMs manually and just check them into their build system. So I'll just be doing that for now. I may return to look and see whether it can be scripted later on, once more of the actual content is written

Votes

Translate

Translate

Report

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