Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter SeventeenApplication Integration Functions (continued)

17.4 Menu Functions

17.4.1 Overview

Every function within the application has a Function ID and a Function Code. Function codes are unique ANSI strings that identify a specific user function within the application. Because strings are not convenient to the underlying application’s coding structure and database tables, a corresponding Function ID as an integer is associated with each code.

Function codes are generally grouped and formatted. For example, “FILE_LAUNCH” is in the group “FILE” with the function “LAUNCH”. The codes never contain spaces and for the vendor provided codes, they are always upper case and underbars are used for spacing and grouping.

Internally, the application uses function IDs which are much faster to work with and they can also index tables and state switches. These IDs are subject to change and should never be relied upon from version to version, always use the code to look up the ID and then the function ID. IDs can be used within the session as long as they are not custom IDs created by the script.

Each menu function is held internally in a function table. This array can be enumerated or searched or referenced by an index. There is a master list of functions for all products, versions and states of release. Just because a function code or ID can be enumerated, it does not mean it is available for a product, to specific view context or is even developmentally complete.

Scripts can add custom functions on the fly which will receive a specific range of IDs. The value of the IDs may vary from application to application, version to version or workstation to workstation.

17.4.2 Function Attributes

Each menu/ribbon function can have the following attributes:

  ID   An integer value in the range from 10,000 to 20,000 assigned by the application. Value ranges are grouped by ribbon and non-ribbon function groups. For example, the Collaborate ribbon functions start at 10,200. Extensions start at 17,000. These values should not be relied upon.  
  Code   A unique code that identifies the function. Maximum of 48 characters.  
  Enabled State   A code that helps the ribbon and menu managers determine the state of the function. Maximum of 8 characters.  
  Class for Function   This is used for group functions. By default, the value will be ‘Extension’ which will force the function to be automatically added to the tools popup on the file ribbon.  
  Menu Text   The text used to display a menu item (in a popup or drop down). Maximum of 64 characters. The “&” character can be used to keyboard access and underline display.  
  Ribbon Text   The text used to display as a ribbon item. Maximum of 64 characters.  
  Short Description   Short description used for dialogs and certain menus. If omitted, a short description is automatically generated. Maximum of 48 characters.  
  Long Description   Description used for popup tips and the status bar. The description can contain simple HTML inline such as <B> or <I>. In addition, return characters can be used to format text within a tool tip. Maximum of 512 characters.  
  Bitmap   Bitmap name and data for use to display an associated icon. Image data can be existing stock resources within the application, resources embedded into the script or external image files.  

 

17.4.3 Function Overview