Application launched most recently

I don’t know if the Finder tracks when an application was launched. If it does, is there a way to find out the most recently launched application?

The information is available, but I don’t know if the means to that information that I know will serve your ultimate goal. In the Finder, select File > Find. Near the top of the window, make certain This Mac is selected. In the search box, enter

kind:app

(note the lack of spaces in that search queary)

then use the column headers in the window to sort by Date Last Opened.

You could track launched applications by using the Application trigger.

Then you could track the most recently launched app.

What is your objective, or use case?

The token %Application%1% will give you the name of the current frontmost app.
If you just want to revert to the last app, use the Activate Prior Application Action.

My immediate objective is to know what was launched most recently regardless of how it was launched. What I’m trying to do is deselect the icon or the Finder text line associated with the last launch. I have screwed things up, mostly by changing file names, because of Apple’s inexplicable policy of leaving launched applications selected. Double-clicking on the desktop or within the window will clear the selected item. The problem is that the opened applcation’s window can cover the lower left corner I was using for the clicks. I planned to hide windows and open the ones from the most recently launced app.

I’m sitting here realizing that with my dock fixed on the right, almost no app windows go past the dock, and I don’t have to hide windows. I can use Peter Lewis’ suggestion to get the last app launched, double-click in the lower right corne (not a hot spot), and then activate that last launched app.

Thanks.

– Does anyone but me think that leaving the last-opened documents or application selected is inappropriate? I’ve done some programming, and that was considered a no-no. Maybe it’s different for the big boys.

I'm not sure why you think that is a problem. I believe it is standard UI for any system to leave the last item double-clicked in its file explorer tool (Finder in this case), so that the user can always tell which file was double-clicked. I would not want it any other way.

Perhaps you need a better means of launching apps. I almost never do so by double-clicking the app file in the Finder. My primary app launcher now is LaunchBar. This is an incredible tool highly recommended by several member of this forum (@Tom being chief among them).

Before LB, I used Mac Spotlight and the Mac Dock. Just don't need to go the Applications folder and double-click on the app.

How exactly does this happen? I can't remember it ever happening to me, or have I seen any reports of it from other users. My first suggestion is to examine your own behavior and see if it can be changed to avoid this.

If not, you can look at tools like this to lock selected files:
Locking files and folders to prevent changes

Of course, that will have some drawbacks and side effects, like when an app needs to make an update. I don't recommend it, but it is an option.

As I said above, IME leaving the last file selected that was double-clicked is the NORM, across both Mac and Windows OS. I have been a developer and IT manager, and that is the behavior I have always observed.

There is an old, old saying: When in Rome, do as the Romans do. :wink:

You can place a stack with the most recent applications into the Dock. Run this in the Terminal:

defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'; killall Dock

The stack will appear at the right-hand side of the Dock (presuming you have the Dock at the bottom of the screen).

This is similar to the Recent Items in the  Menu, but with the difference that the apps in the Dock stack are sorted by most recent launch. (The ones in the  Menu are sorted alphabetically.)

@Tom, you never cease to amaze me with your cool tools. :wink:

I don't really need this, but I'd like to see what it looks like.
How can I remove it later, if I want to do so?

Oh, I find it quite handy. It looks like this:

You can configure what and how you want to have it displayed:

Right-click the stack icon and select Remove from Dock.


Edit (2017-09-24): Simplified the instructions how to remove the stack :sunglasses:

I have inadvertently removed the name of the file or replaced it with
characters I thought I was typing elsewhere. I¹ve accidentally opened a
document because it was selected. And if you are thinking ³how careless,² I
have a movement disorder and arm and hand tremors. They wax and wane, and
things can be a mess when they wax together.

I still think it¹s wrong to leave an object selected and active. Apple could
simply make note of the file and deselect it. That would prevent accidents.
Apple could provide a quick method for re-selecting the file for those who
need it. But, why would anyone use a selected file more than one time in a
thousand? You double-clicked or command-O opened the file. It¹s either an
application or a document loaded into an application. At this point, why
would you do need to see the selected file in the Finder? The opened
application or document is staring you in the face. The only benefit I can
see is visual help with the location of a document. But, you can get the
entire path by control-clicking the document title. If you have thousands of
items in the enclosing folder, it¹s faster to go to list mode, drag the
thumb, and pay attention to first letters instead ofwaiting to see a
highlighted record.

Sincerely,
Greg Tetrault

I’m not sure why you think that is a problem. I believe it is standard UI
for any system to leave the last item double-clicked in its file explorer
tool (Finder in this case), so that the user can always tell which file was
double-clicked. I would not want it any other way.