User Tools

Site Tools


function:SCREEN

**This is an old revision of the document!**

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:

  • Main - the screen with the primary menu bar (as configured in the Displays preferences).
  • Second - the left most screen that does not have the menu bar.
  • Third - the left most screen that is not the Main or Second screen.
  • Internal - the left most screen that is an internal screen (typically on a laptop).
  • External - the left most screen that is not an internal screen.
  • Mouse - the left most screen containing the mouse.
  • Front - the left most screen containing (the most of) the front window.
  • Back - the left most screen not containing (the most of) the front window.
  • Back2 - the second left most screen not containing (the most of) the front window.

The SCREEN coordinate can be:

  • Left
  • Right
  • Top
  • Bottom
  • Width
  • Height
  • MidX
  • MidY

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).

See Also


Actions

Functions

Tokens

Forum

function/SCREEN.1468561341.txt.gz · Last modified: 2016/07/15 01:42 by peternlewis