Returns the operating system's name of the specified monitor.
Name := MonitorGetName(N)
Type: Integer
If omitted, the primary monitor will be used. Otherwise, specify the monitor number, between 1 and the number returned by MonitorGetCount.
Type: String
This function returns the operating system's name for the specified monitor. The form of the name depends on the platform:
| Platform | Name |
|---|---|
| Windows | The GDI display device name, such as \\.\DISPLAY1. |
| Linux (X11) | The XRandR output name, such as DP-1 or eDP-1. |
| Linux (Wayland) | The connector name, in the same form. |
| macOS | The display's localized name. |
On an X server with no named outputs, such as Xvfb, the name is display-N. Names are always distinct.
For a monitor's model and manufacturer rather than the operating system's device name, see the Monitor object.
An exception is thrown on failure.
See example #1 on the Monitor Functions page for a demonstration of this function.