Skip to content

system

system

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.

alert("Your OS is " + system.osName + " running version" + system.osVersion);
confirm("You are: " + system.userName + " running on " + system.machineName + ".");

system.machineName

The name of the computer on which After Effects is running.

String; read-only.


system.osName

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

The version of the current local operating system.

String; read-only.


system.userName

The name of the user currently logged on to the system.

String; read-only.


system.callSystem(cmdLineToExecute);

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);
ParameterTypeDescription
cmdLineToExecuteStringThe command and its parameters.

The output from the command.