environment_get_variable

Returns the value of the given environment variable.

Syntax:

GML Code Example

environment_get_variable(name);


Argument Description
name The name (a string) of the environment variable to check.


Returns: String


Description

This function returns the value (a string) of the environment variable with the given name (also a string).

NOTE: This is a Windows only function.


Example:

GML Code Example

e_str = environment_get_variable("APPDATA");

The above code will return the full path for the environment variable "%appdata%", which in Windows XP is normally "C:\Documents and Settings\{username}\Application Data" and in Windows Vista/7 "C:\Users\{username}\AppData\Roaming".





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here