Customizing FrameMaker’s UI with ExtendScript (A Beginner’s Guide!)

Popular Adobe Tech Comm webinar guest, Russ Ward, gave a highly instructive presentation on modifying FrameMaker’s menus and user interface via ExtendScript in mid-December.

You may view the recording of this webinar by clicking on the hyper-linked TITLE below:

Customizing UI for FrameMaker with ExtendScript (A Beginner’s Guide!)

Minute markers for key highlights in the recording

05:00 Speaker contact information
06:30 Common misconception that TechWriter’s don’t need to write code
08:00 FrameMaker leads the pack of tools with the ease in which it
lets you write code to make it work better for you.
You can get a lot from efficiencies with “little things”
10:30 The files available for download are for follow-up …
you may download them at end of session when pod reappears
11:30 DEMO
Setting expectations for starting session at “beginner’s” level
13:00 example of one line of ExtendScript code
Creating a simple alert
13:30 Example of embedding script into some function
14:45 Starting with MENUS and COMMANDS
15:00 Think of things w/in FrameMaker as OBJECTS
FrameMaker session is the PARENT OBJECT
DOCUMENT OBJECT might “own” the FLOW OBJECT
16:00 CREATING A MENU
capturing menu name in a VARIABLE “var”
18:00 making LABEL for a MENU
18:30 example of menu not appearing because no location specified
19:00 adding location for a menu
identify the main menu then run function called “add me”
app.GetNamedMenu
21:15 must add “UpdateMenus();” in order for htis to do
shown: a menu added with 4 lines of code
22:15 using “myMenu.DefineAndAddCommand” function
24:20 If you use an existing command that is “reserved” … it won’t work
25:30 example has only 6 lines of code, but new menus have been added
26:30 Using a “call back” to call back a command you have defined
Script uses a number that you have assigned a command to
28:00 Sometimes you have to restart FrameMaker if you are repeatedly
adding commands and notifications
29:00 Script now has 8 lines of code and you have two custom menus
that will invoke a message …
30:00 using “if” and “else if” structure for alternate results
32:30 Question: what if you have more than 2 menus?
Answer: you simply add more numbered values and make the “else if”
string longer
33:30 DIALOGUE BOXES: goal is to make MODELESS dialogue box
[modeless dialogue can float; a modal dialogue will freeze rest of FM until
choice is made … ]
35:00 Two ways to create this dialogue discussed
including using RESOURCE STRING
36:00 start with most basic modeless dialogue, a “palette”
must create a WINDOW object with “new Window” call
[Note that pop-up tips in FrameMaker prompt you on how to complete the call]
38:00 enter code calls to invoke the dialogue, and a call to actually show it
39:40 Can enter X/Y coordinates to indicate where a dialogue should appear in
relation to the UPPER LEFT corner of FrameMaker screen
40:20 using TRIPLE QUOTES (“””) to enable you to write contiguous strings
41:00 Curly braces used to GROUP THINGS TOGETHER
41:30 Adding a BUTTON to this Palette
42:45 visual results of first floating pod with button.
(button does not have a funciton yet)
43:30 Declaring EVENT HANDLERS
Determine that action you want when some chooses buttons in dialogues
e.g. “on double click” “on hover” … etc.
46:00 after only 8 or 9 lines of code, Russ has created fairly
impressive customized menu with multiple layers
47:00 Defining RADIO BUTTONS
48:30 how to specify that one of the RADIO BUTTONS is PRE-SELECTED
49:00 Discussing LAYOUT with “columns” of commands in rectangles
By default, layout is stacked in a column
You can specify “row” for horizontal layout
50:20 Discussion of making PANELS (like the Dita Options Panel)
53:00 Setting behavior if certain button is MANUALLY selected