screenFrame
Returns a screen's position and size as `x,y,width,height` text.
Keyboard Maestro: Screen
Details #
screenFrame(which?) takes zero or one argument and returns text such as 0,0,1512,982: left, top, width and height in whole screen points, origin at the top left of the main display.
which picks the screen: empty or main is the main screen, a 1-based number picks by position in the list of displays (1 is the main screen), last is the last one, and anything else is matched against screen names, exact first and then by containing the text.
Parameters #
Takes 0 to 1 argument.
{{ screenFrame(text?) }}
Examples #
screenFrame()→
screenFrame("main")→
Gotchas #
A screen that doesn't exist gives empty text, not an error. That is also what you get when there are no screens to read.
The result is text. Use
screen()for one number.