windowInfo
Returns a window's title, id, position, size or frame as text or a number.
Keyboard Maestro: FrontWindowPosition, FrontWindowSize, FrontWindowFrame, WindowPosition, WindowSize, WindowFrame, WindowID
Details #
windowInfo(which, field) takes exactly two arguments.
which picks a window of the front app: empty text or
frontfor the front window, a 1-based number, or all or part of a title.field is
name(the title),id(the window's number, as a number),position(x,y),size(width,height) orframe(x,y,width,height). Anything else gives the frame. Numbers in the text are whole screen points.
Parameters #
Takes 2 arguments.
{{ windowInfo(text, b) }}
Examples #
windowInfo("front", "frame")windowInfo("1", "size")Gotchas #
Unlike
window(), a window that isn't there gives empty text, not an error.Matching by title looks at the window names the system reports; a window with no reported name can only be picked by number.
Only the front app's on-screen windows are searched.