Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FourFlow Control (continued)

4.13 Executing External Programs

4.13.1 Overview

In many cases it is desirable to run an external program either as a script or as a completely separate application. This can include other scripts or other programs. There are several options:

–  Running a menu function

–  Running another script

–  Running another script in a background thread

–  Running another program within Windows (shell)

4.13.2 Menu Functions

All menu functions are accessible from a script (the set of menu features varies depending on the host application). The RunMenuFunction allows application menu functions to be run, which in turn can cause other scripts and hooks to be run. Programmers should use caution not to cause loops between scripts and the menu functions which will cause a stack overflow and the host application to terminate.

4.13.3 Scripts

Scripts can be called with the RunScript or the RunBackgroundScript function. The RunScript function will load the specified script (and its associated included files), run the script from the default entry point or a specified function name. The RunBackgroundScript performs the same task but immediately returns with a thread handle. Background threads are covered in the next section, Section 4.14 Control and Background Processes.

4.13.4 Shell

Legato allows for access to the Windows Shell via the RunProgram function. A separate windows process is spawned. Any program can be run.

4.13.5 External Program Functions