Skip to content

Foreground App

  • Condition
  • Apps & windows

Yes when the app you're using right now is the one you name.

Using it

On a trigger it's App in front, under Only when. Hotkey F8 with App in front: chrome.exe works only in Chrome; everywhere else the key reaches the app as usual.

In the steps, add If and choose it: the steps under Then run when it matches, those under Otherwise when it doesn't.

The Foreground App step in the MacroWin editor
Ctrl+Shift+V opens Paste Special in Word and pastes normally in every other app.

Variations

Settings

SettingStarts asWhat it does
Process name ${} notepad.exe Matches is true when this app is in front, such as notepad.exe. Leave it empty to only read the app in front.

Settings marked ${} take variables.

Outputs

Foreground App outputs
MatchesTrue when the app in Process name is in front.
AppThe name of the app in front, such as notepad.exe.
TitleThe title of the window in front.
PathThe full path of the program in front, such as C:\Windows\notepad.exe.

More in Apps & windows: Virtual Desktop, Window Info, Element Exists

Build macros with Foreground App in MacroWin. Free to download, no account needed. Windows 10 and 11.

Download