GetEnv Method (Shell Object)

Retrieves an environment variable.

[JavaScript]

str = shell.GetEnv( strName );

[VBScript]

str = shell.GetEnv( strName )

Parameters

strName

The name of the environment variable.

Examples

[JavaScript]

str = shell.GetEnv( "OPENAI_API_KEY" );

[VBScript]

str = shell.GetEnv( "OPENAI_API_KEY" )

Return Value

Returns the contents of the specified environment variable.

Version

Supported on EmEditor Professional Version 24.0 or later.