system
System object
Section titled “System object”system
Description
Section titled “Description”The System object provides access to attributes found on the user’s system, such as the user name and the name and version of the operating system. It is available through the system
global variable.
Example
Section titled “Example”alert("Your OS is " + system.osName + " running version" + system.osVersion);confirm("You are: " + system.userName + " running on " + system.machineName + ".");
Attributes
Section titled “Attributes”System.machineName
Section titled “System.machineName”system.machineName
Description
Section titled “Description”The name of the computer on which After Effects is running.
String; read-only.
System.osName
Section titled “System.osName”system.osName
Description
Section titled “Description”The name of the operating system on which After Effects is running.
As of Windows 7, this attribute returns a blank value. Use $.os instead.
String; read-only.
System.osVersion
Section titled “System.osVersion”system.osVersion
Description
Section titled “Description”The version of the current local operating system.
String; read-only.
System.userName
Section titled “System.userName”system.userName
Description
Section titled “Description”The name of the user currently logged on to the system.
String; read-only.
Methods
Section titled “Methods”System.callSystem()
Section titled “System.callSystem()”system.callSystem(cmdLineToExecute);
Description
Section titled “Description”Executes a system command, as if you had typed it on the operating system’s command line. Returns whatever the system outputs in response to the command, if anything. In Windows, you can invoke commands using the /c
switch for the cmd.exe
command, passing the command to run in escaped quotes (\"...\"
). For example, the following retrieves the current time and displays it to the user:
var timeStr = system.callSystem("cmd.exe /c \"time /t\"");alert("Current time is " + timeStr);
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
cmdLineToExecute | String | The command and its parameters. |
Returns
Section titled “Returns”The output from the command.