Browse the docs

screenVisible

Returns a coordinate or size of a screen's visible area, without the menu bar and Dock.

Keyboard Maestro: SCREENVISIBLE

Details #

screenVisible(coordinate, percent?) or screenVisible(which, coordinate, percent?) works exactly like screen (same arguments, coordinates, percentages and 1-based screen numbers) but measures the visible area: the screen minus the menu bar and the Dock. Numbers are whole screen points with the origin at the top left of the main display.

Parameters #

Takes 1 to 3 arguments. {{ screenVisible(text, b?, c?) }}

Examples #

screenCount() > 0 ? screenVisible("height") : 0
→ 0
screenCount() > 0 ? screen("height") - screenVisible("height") : 0
→ 0

Gotchas #

  • A screen that doesn't exist is an error: screenVisible() found no screen '3' (2 connected).

  • An unknown coordinate is an error that lists the valid ones.

  • When there are no screens to read (a test run, a fake system) every call is the no-screen error. Check screenCount() first.