environment

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the environment
environment()
Summary

Returns the type of running environment the stack is in.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
the environment
if the environment is "development" then showDevelopOptions
Values
NameTypeDescription
return

The environment function returns one of:

"development": The stack is running under the development environment.
"development command line": The stack is running in the development environment with the "-ui" command line option.
"standalone application": The stack is running as a standalone application.
"helper application": LiveCode is running as a standalone with the secureMode property set to true.
"command line": The stack is running as a standalone application with the "-ui" command line option.
"server": The stack is running in LiveCode server.
"browser": The stack is running as a LiveCode applet.
"mobile": The stack is running on a mobile device.
RelatedProperty: secureMode
Function: version, revLicenseType, buildNumber, systemVersion
Description

Use the environment function to change a stack's behavior depending on how the stack was opened.