Get the Name of the Frontmost Application

At the beginning of a macro, I want to get the name of the frontmost application. I care nothing about the app’s windows. At the end of the macro, I will activate the application to bring it back to the front.

I can’t find any way to get the front application’s name without using Applescript. Is there a more direct method?

You can use the %Application%1% token:


As @gglick has shown you, KM has lots of very useful Tokens , which are like functions that return info about your Mac's environment. You can usually use a KM Token in the text field of any KM Action.

This is gold to my eyes.

Thank you!