Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter OneIntroduction (continued)

1.3 Linking Legato to the Application

1.3.1 General

A powerful feature of Legato is its ability to be linked into the host application. Not only can scripts be run on command, they can be “hooked” into various sections of the application. There are a number of basic types of linkage: on startup, on menu functions, within menu functions, within certain dialogs, and for specific actions.

Application startup — On startup, a script with a predefined name can be run to perform initialization, linkage, and other preparation functions. Not only can this setup the host application, it can also perform tasks such as checking with external systems and logging access to the application or other security setup.

Hooking menu items — Menu functions can be linked for pre-processing and post-processing functionality. Some functions will permit deeper hooks. In addition, custom menu and ribbon functions can be added that can run Legato scripts.

Hooking windows — Certain windows can have script hooks added to them.

Hooking dialogs — Certain dialogs offer Legato hooks to alter the functionality of the dialog.

1.3.2 Debugging Hooks

Of issue when working with a hook is recovering runtime script error information. By adding a folder named “LegatoLogs” within the application data folder for the user (normally at the location “%appdata%\Novaworks”), Legato will automatically write a an XML log file using the current tick count and the extension “.log”. The file is transitory since a message is posted to immediately display and the file deleted. If the folder is not present, the log is essentially lost on each execution.