Front app
Passes when the app in front has the given bundle identifier.
app is in front
Keyboard Maestro: Application (Active, NotActive)
Details #
Compares the bundle identifier of the frontmost app with bundleId, ignoring case. com.apple.finder is Finder, com.apple.Safari is Safari. The identifier must match exactly; a name like Finder does not.
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.
When the macro doesn't run, the Not fired report in ⌘2 Activity names this condition and shows frontApp (what was in front) and expected (what you asked for).
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
bundleId | text | Yes | The app's bundle identifier. Text from the token {{frontApp}} works too. |
Examples #
- Press ⌃⌥J
- If the front app is Finder
- Show “In Finder”
- Press ⌃⌥J
- If the front app isn't Terminal
- Show “Not in Terminal”
Gotchas #
A macro run by hand (from the Palette, the CLI or the app) or by another macro's
runMacrostep skips the Only if list and runs anyway; the trace still records the verdict and says it was skipped. Only triggers are gated.