
14
ADOBE FRAMEMAKER SCRIPTING GUIDE
Differences between scripts and FDK
Last updated 9/26/2011
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.
Содержание 65030365 - FrameMaker - PC
Страница 1: ...Scripting Guide ADOBE FRAMEMAKER 10...