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

How to execute a FrameMaker command (ExtendScript)

Mentor ,
Jan 17, 2015 Jan 17, 2015

Copy link to clipboard

Copied

Hi, does anyone know how to execute a command that your script did not create? In particular, I want to invoke the Edit > Update References command and launch that dialog box.

Thanks,

Russ

TOPICS
Scripting

Views

1.0K

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

correct answers 1 Correct answer

Community Expert , Jan 17, 2015 Jan 17, 2015

Hi Russ, I think you want this:

#target framemaker

var cmd = app.GetNamedCommand ("Update");

Fcodes ([cmd.Fcode]);

If this isn't what you are looking for, let me know. Thanks. -Rick

Votes

Translate

Translate
Community Expert ,
Jan 17, 2015 Jan 17, 2015

Copy link to clipboard

Copied

Hi Russ, I think you want this:

#target framemaker

var cmd = app.GetNamedCommand ("Update");

Fcodes ([cmd.Fcode]);

If this isn't what you are looking for, let me know. Thanks. -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
Mentor ,
Jan 18, 2015 Jan 18, 2015

Copy link to clipboard

Copied

Hi Rick, that is exactly what I wanted. Thank you. As I look at your answer, it makes sense... it's all just Fcodes, but I did not know of the Fcode property for a command. Very handy.

Russ

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
New Here ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

Hi,

Thanks for this post. This is close to what I'm looking for, but not exactly. I haven't be able to figure out how to work with menu that brings up a pop-up box. In particular, the Structure -> Utilities -> Generate Conversion Table

I've figured out what the command name is for this menu item (SGInitRuleTable), but line 4 in your script would bring forth the dialog box.

The FCodes class doesn't seem to have a method to modify the dialog box (e.g., select OK button and 'click'). Do I need to send an event to that dialog box or is there an another way to perform this action?

Thanks.

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 ,
Jul 08, 2019 Jul 08, 2019

Copy link to clipboard

Copied

LATEST

As far as I know, you cannot use FCodes or any other ExtendScript commands for manipulating FrameMaker dialog boxes. However, if you look at what this command does, you can duplicate its functionality through scripting:

1) Make a three column table in a new document.

2) For each format in the original document, put an entry in the first column of the table with the correct prefix (P for paragraph format, C for character format, etc.).

3) Put the same name in the second column, but without the prefix.

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