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
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
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
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
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.
Copy link to clipboard
Copied
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.