Front window state
Passes when the front app has a window, and optionally whether that window is full screen or not.
The front window is state
Keyboard Maestro: Front Window (Exists, Is Full Screen)
Details #
Looks at the focused window of the front app. exists passes when there is one. fullScreen passes when there is one and it is in full screen. windowed passes when there is one and it isn't full screen. Because windowed needs a window, it is not the opposite of fullScreen: with no window at all both are false.
The trace shows exists, fullScreen and the state you asked for. Reading the window is harmless, so it happens for real in a dry run too.
Every condition accepts "negate": true, which flips the verdict. The trace records what was compared before the flip, so a negated condition that blocks a macro still shows the real values.
Conditions in an Only if list combine with all: every one must pass, and an empty list always passes. An if step or a repeat loop takes a match of all (default) or any.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
state | one of | Yes | exists fullScreen windowed | One of exists, fullScreen, windowed. |
Examples #
- If the front window is full screen
- Show “Front window is full screen”
- Else
- Show “Not full screen, or no window”
Gotchas #
Unknown state names fail with
unknown window state.