Adobe 65030365 - FrameMaker - PC Manual page 22

Scripting guide
Hide thumbs Also See for 65030365 - FrameMaker - PC:
Table of Contents

Advertisement

ADOBE FRAMEMAKER SCRIPTING GUIDE
Differences between scripts and FDK
3
The commands:
nMenu1.DefineAndAddCommand(1,"cmd1","command1","");
nMenu2.DefineAndAddCommand(2,"cmd2","command2","");
add two new menu entries called Command 1 and Command 2 under the menu entries Menu1 and Menu2, that
were defined in step 2.
4
Finally, the block of code:
function Command(cmd) {
case 1: alert("Command 1 executed");
break;
case 2: alert("command 2 executed");
break;
}
assigns the relevant commands to the menu entries defined in step 3.
The number after the keyword case is the menu ID. Look at the command in step 3:
nMenu1.DefineAndAddCommand(1,"cmd1","command1","");
The first value within the parenthesis is the menuID. This value is passed to the case statement.
The system pops up the relevant alert when the corresponding menu entry is clicked.
Last updated 9/26/2011
14

Advertisement

Table of Contents
loading

This manual is also suitable for:

Framemaker 10

Table of Contents