The SCREEN() and SCREENVISIBLE() functions return the position or size of a screen. SCREENVISIBLE() refers to the visible section of the screen, excluding the menu bar and the dock.
SCREEN( index, coordinate ) SCREEN( index, coordinate, percentage )
The SCREEN index can be 0 for the main screen, and then 1 through n are the screens in orientation order from left to right (and top down for screens at the same position). The index can also be one of:
The SCREEN coordinate can be:
The optional SCREEN percentage parameter specifies a percentage of the width or height to offset by. Offsets are always to the right and down, but negative offsets are allowed.
For example SCREEN(Internal,Left,10%) would be the coordinate of left edge of the internal screen plus 10% of the width of the internal screen. SCREEN(Front,Right,-10%) would be the coordinate of the right edge of the external screen minus 10% of the width of the external screen.
SCREEN sizes and positions are in nominal resolution pixels (so a retina screen will typically have half as many nominal resolution pixels as raw pixels).
Coordinates are in absolute coordinates (relative to the top left corner of the main screen).