This object allows you to get informations about the current operating system and execute some actions on it.
Constructor function.
var myObject = new System();
Returns the path of a standard storage location.
myObject.storageLocationPath(location);
Returns the name of a standard storage location.
myObject.storageLocationName(location);
Uses the default browser to open an URL.
myObject.openUrl(url);
Returns the screen count.
myObject.screenCount();
Returns the available geometry on a screen.
myObject.screenCount();
myObject.screenCount(screen);
Returns the screen geometry.
myObject.screenGeometry();
myObject.screenGeometry(screen);
Returns the primary screen index.
myObject.primaryScreen();
Returns true if the desktop is virtual. A virtual desktop may assemble multiple monitors into one screen.
myObject.isVirtualDesktop();
Returns the color depth of a screen.
myObject.colorDepth(screen);
Returns the display brightness of a screen.
myObject.displayBrightness(screen);
Returns the current directory.
myObject.currentDirectory();
Returns the user name.
myObject.username();
Returns the value of an environment variable.
myObject.variable(name);
Returns the current Unix timestamp.
myObject.timestamp();
Returns the operating system name.
myObject.osName();
This method should return "GNU/Linux" or "Windows".
Returns the operating system version.
myObject.version();
Returns the current country code.
myObject.countryCode();
Returns the current language.
myObject.language();
Returns an array of string representing the logical drives.
myObject.logicalDrives();
Returns the available disk space on a drive in bytes.
myObject.availableDiskSpace(drive);
Returns the total disk space on a drive in bytes.
myObject.totalDiskSpace(drive);
Returns the type of a drive.
myObject.driveType(drive);
Returns the battery level.
myObject.batteryLevel();
Returns the power state.
myObject.powerState();
Returns the device's manufacturer name.
myObject.manufacturer();
Returns the device's model name.
myObject.model();
Returns the device's product name.
myObject.productName();
Logouts the current user.
myObject.logout();
myObject.logout(force);
Restarts the computer.
myObject.restart();
myObject.restart(force);
Stops the computer.
myObject.shutdown();
myObject.shutdown(force);
Suspends the computer.
myObject.suspend();
myObject.suspend(force);
Hibernates the computer.
myObject.hibernate();
myObject.hibernate(force);
Locks the screen.
myObject.lockScreen();
Starts the screen saver.
myObject.startScreenSaver();
A drive type.
A power state.
A standard storage location.