Skip to content
UI Actions icon Home UI Actions 0.9.2 › Actions

UI Actions › Actions › Get Windows

Returns the window or windows that fulfill the specified criteria.

Filtering is additive, i.e. windows must meet all filter criteria to be included in the results.

The order of the windows is returned by macOS in 'front to back' direction.

Parameters

App

The app whose windows you're interested in.

Type: An app from a pre-defined list of available apps

Which window(s) to return

All windows: Returns all windows belonging to the app. When filtering is applied, returns the list of filter results.

First window: Without filtering, this usually yields the frontmost window. When filtering is applied, returns the first window that fulfils the filter predicates.

Focused window: In macOS, the front window of an application is usually the focused window, meaning it is the active window that receives user input. However, there are some exceptions and edge cases where this might not be true, such as when modal dialogs or alert windows are present.

Main window: Many applications designate one specific window their main window.

Options:

  • all windows
  • the first window
  • the focused window
  • the main window

Filter by window type

Floating windows are windows like palettes, for example the media information window in Preview. Only available when choosing "all windows" or "first window".

Options:

  • no
  • standard window
  • floating window

Filter by window title

Setting this to anything other than "no" enables filtering window by their title. (Not available when choosing frontmost or main window.)

Options:

  • no
  • is …
  • contains …
  • begins with …
  • ends with …
  • matches regular expression …

Title filter string

Filter the results by this title string as specified by the 'Filter by window title' parameter. (Only available when filtering by window title is enabled.)

Type: Text

Case-insensitive filtering

Enable if lowercase and uppercase shouldn't make a difference. (Only available when filtering by window title is enabled.)

Type: Boolean (YES/NO)

Filter by visibility

Only available when choosing "all windows" or "first window".

Options:

  • no
  • visible windows only
  • minimized windows only

Return Value

Window reference (list)