Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter SixFile Functions (continued)

ExpandEnvironmentalStrings Function

Overview

The ExpandEnvironmentalStrings function takes an incoming string and expands any environmental variable references such as “%appdata%” or %temp%.

Syntax/Parameters

Syntax

string = ExpandEnvironmentalStrings ( string source );

Parameters

source

A string containing the string to be expanded. The string is assumed to be UTF-8 encoded. The string cannot be more than 32,768 characters in size.

Return Value

A string containing the encoded version of source or an empty string on failure. Use the GetLastError function to retrieve error information.

Remarks

Windows maintains a table of environmental variables for each process. In addition, there are certain reserved terms processed by the function specific to Novaworks applications.

The maximum size of the buffer is 32K although the return string could potentially be larger if variables are replaced with larger strings.

The Novaworks reserved variables are as follows:

%AppPath% — Application’s program folder.

%DesktopPath% — Path for the user’s desktop.

%DocumentsPath% — Path for the user’s My Document folder.

%MyProjectsPath% — Path for the defined projects path.

%ProjectPath% — Path for the currently open project.

Variable names are not case-sensitive.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic