MonitorGetName

Returns the operating system's name of the specified monitor.

Name := MonitorGetName(N)

Parameters

N

Type: Integer

If omitted, the primary monitor will be used. Otherwise, specify the monitor number, between 1 and the number returned by MonitorGetCount.

Return Value

Type: String

This function returns the operating system's name for the specified monitor. The form of the name depends on the platform:

PlatformName
WindowsThe 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.
macOSThe 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.

Error Handling

An exception is thrown on failure.

SysGet, Monitor functions

Examples

See example #1 on the Monitor Functions page for a demonstration of this function.