Menus And Commands - Adobe 65030365 - FrameMaker - PC Manual

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

Advertisement

ADOBE FRAMEMAKER SCRIPTING GUIDE
Differences between scripts and FDK
desired even occurs.(Similar to F_ApiNotify())
Syntax for this callback function is:
@params
note:
notification id to identify the event.
object:
current document or book object which generated the event.
sparam:
The string, if any, associated with the notification
(For example, if the notification is for an Open or Save operation, sparm specifies the
pathname of the affected file. If the notification is for text entry, sparm specifies the text the
user typed.)
iparam: The Integer, if any, associated with the notification. Probably the fcode or bit flags.
Notify(note, doc, sparam, iparam)
Note: for more details please see F_ApiNotify() in FDK reference guide.
*/
function Notify(note, object, sparam, iparam)
{
switch (note) {
case FA_Note_PostOpenDoc:
alert("Opened document " + sparam);
break;
}
The line of code:
Notification(FA_Note_PostOpenDoc,true);
registers this script for the
FA_Note_PostOpenDoc
is opened in FrameMaker.
The lines of code:
function Notify(note, object, sparam, iparam)
{
switch (note) {
case FA_Note_PostOpenDoc:
alert("Opened document " + sparam);
break;
}
pops up an alert with the file name just after the file is opened.

Menus and Commands

Scripting allows you to add custom menus and associate commands with these menus. In addition, you can implement
your own handlers for commands in a similar way as the FDK.
The following script adds two menus and associated commands to the FrameMaker main menu.
notification. This notification is triggered just after any document
Last updated 9/26/2011
12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Framemaker 10

Table of Contents