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

Is it possible to create a script to get user input when beginning a New Book?

Explorer ,
Feb 17, 2018 Feb 17, 2018

Copy link to clipboard

Copied

When I start a service manual for a new product, I would like to have dialog boxes open that asks for specific information to define the variables of the template. Is scripting what I am looking for and able to do this? I extremley little experience with Framemaker 2017. Thank you.

TOPICS
Scripting

Views

371

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
Engaged ,
Feb 17, 2018 Feb 17, 2018

Copy link to clipboard

Copied

yes scripting is what you are looking for.

you have to register for some Events like FA_PostOpenDoc, FA_PostOpenBook, bring up your sialog and set your FM variables

Markus

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
Community Expert ,
Feb 17, 2018 Feb 17, 2018

Copy link to clipboard

Copied

Do you have any scripting experience? Once you get into dialog boxes, etc., the scripting gets a little more complicated than beginner level. I have created scripts like this in the past; here is 6-minute video illustrating one way I have done this:

http://www.rickquatro.com/resources/SetDocumentData.mp4

In general, the best approach is to break the overall task down into individual pieces and work on each one separately:

1) Getting and setting a variable format value in an active document.

2) Processing all of the files in a book.

3) Building a dialog box to collect values.

When you break things down into smaller parts, it is generally easier to get help here. -Rick

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 ,
Feb 20, 2018 Feb 20, 2018

Copy link to clipboard

Copied

frameexpert (Rick)

I have no scripting experience. The concept about breaking the overall tasks into smaller tasks first is the same concept used when programming microcontrollers.

I know I need to create a UI dialog box to ask the questions and to capture the answers. Those answers then need to update the associated variables. Hopefully, I will be able to find some examples here in cyberspace.

Thank you.

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
Engaged ,
Feb 20, 2018 Feb 20, 2018

Copy link to clipboard

Copied

LATEST

Hi,

checkout ExtendScript samples by Russ Ward: FrameMaker ExtendScript Samples - West Street Consulting

There you will find two samples for creating dialogs (09.01/09.02) and a sample on how to work with doc open notifications (06.01.)

I would recommend also to have a look into the other samples. And debug them, so you will get a feeling on how FM-API programming works.

app.ActiveDoc.GetNamedVarFmt("yourvariablefmt") gives access to a variable format named "yourvariablefmt" in active document. So you can change the value of this Format to an initial value set in your dialog.

Keep on fighting 🙂

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