Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FourFlow Control

Chapter Contents

4.1 Introduction to Program Flow Control
4.1.1 Overview
4.1.2 Statement Keywords Versus Functions
4.1.3 The Script Engine
4.2 Statements and Blocks
4.2.1 Overview
4.2.2 The Statement
4.2.3 Blocks
4.2.4 Functions
4.2.5 Programs
4.3 Entry Point
4.3.1 Overview
4.3.2 How Does a Script Start
4.3.3 How Entry Points Are Used
4.3.4 Reentrant Scripts
4.3.5 Unexecutable Code
4.4 Loops
4.4.1 Overview
4.4.2 Exiting Loops
4.4.3 The ‘break’ Keyword
4.4.4 The ‘continue’ Keyword
4.5 The ‘while’ Loop
4.5.1 Overview
4.5.2 Syntax and Structure
4.6 The ‘for’ Loop
4.6.1 Overview
4.6.2 Syntax and Structure
4.7 Conditionals
4.8 ‘if’, ‘elseif’ and ‘else’ Statements
4.8.1 The If Condition
4.8.2 Syntax and Structure
4.9 The ‘switch’ Statement
4.9.1 Overview
4.9.2 Syntax and Structure
4.9.3 Limitations and Remarks
4.10 Script Functions
4.10.1 Overview
4.10.2 Prototypes
4.10.3 Passing Parameters
4.10.4 Returning Values
4.11 The ‘return’ Statement
4.12 The ‘exit’ Statement
4.13 Executing External Programs
4.13.1 Overview
4.13.2 Menu Functions
4.13.3 Scripts
4.13.4 Shell
4.13.5 External Program Functions
CreateProcess Function
CreateProcessAsElevated Function
EnumerateScripts Function
GetProcessExitCode Function
RunBackgroundScript Function
RunScript Function
RunProgram Function
RunProgramElevated Function
WaitForObject Function
4.14 Control and Background Processes
4.14.1 Overview
4.14.2 Limitations
4.14.3 Running Scripts in Background
4.14.4 Functions
GetScriptDefaultLog Function
GetScriptErrorLog Function
GetScriptHandle Function
GetScriptProperties Function
GetThreadHandle Function
IsScriptInBackground Function
IsThreadRunning Function
4.15 Session Data
4.15.1 Overview
4.15.2 Identifying Session Data
4.15.3 Limitations and Notes
4.15.4 Background Scripts
4.15.5 Functions
DecrementSessionValue Function
DeleteSessionValue Function
EnumerateSessionData Function
GetSessionInteger Function
GetSessionPoolSize Function
GetSessionString Function
GetSessionWord Function
IncrementSessionValue Function
ResetSessionData Function
SetSessionValue Function
TestAndSetSessionValue Function
4.16 Directives
4.16.1 What Are Directives
4.16.2 The #include Directive
4.16.3 The #define Directive
4.16.4 Default Definitions
4.16.5 The #ifdef Directive
4.16.6 The #ifndef Directive
4.16.7 The #elseif Directive
4.16.8 The #elif Directive
4.16.9 The #endif Directive
4.16.10 The #resource Directive
4.16.11 The #endresource Directive
4.16.12 The #pragma Directive
4.17 Comments