Browse the docs

frontWindowTitle

The title of the front app's focused window.

Keyboard Maestro: FrontWindowName

Details #

Use it anywhere a {{ }} expression is allowed, as {{frontWindowTitle}} in a step's text or as frontWindowTitle inside a longer expression. It also works as a call, frontWindowTitle(). It reads the title of the focused window of the front app through Accessibility. A window with no title gives an empty string.

Without Accessibility access it is an empty string. The same is true when there is no window.

A run variable with the same name wins. If a step stores something in a variable called frontWindowTitle, {{frontWindowTitle}} reads that variable, not the live value. Name your own variables something else.

Parameters #

Write it as {{frontWindowTitle}} in any text field. A variable of the same name wins.

Examples #

contains(frontWindowTitle, "Inbox")
→ true
Sample variableValue
frontWindowTitleInbox (3) - Mail
Show the window title
When
  1. Press ⌃⌥J
Do
  1. Show “Window: {{frontWindowTitle}}”
Open in Switchboard to try it

Gotchas #

See also #