Recent Documents?

Hello everyone,

Could u please advise whether there is a macro that can be used to access recent documents (something like Trickster app) using a hot key? Best wishes, Aly

Which recent documents are you referring too? And how do you want to access them?

Hey Aly,

There's no simple way to do that, however Keyboard Maestro can do many things that aren't simple if one is willing to figure out how.

Why don't you explain more precisely what you want to do.

One thing that is easy to do is open the 'Recent Items' menu.

From there you can type-select to get where you want and then type to select it.


Many thanks Chris and Elder for your replies. What I am looking for is using a hot key to open recent items (e.g. Recent Word/Excel/PPT/PDF documents or alternatively Dropbox recent items that had been saved recently) - something like Launch Applications macro. Sorry if I was not clear before.

If you’re looking for a pretty GUI like Trickster you’re out of luck.

But you’re still being unclear about what you want.

You want to open 5 million files from the last 10 years?

Or just files from the last 5 hours?

You want a list of ALL Word/Excel/PPT/PDF documents in that time, or do you want to find ONLY Word documents or Excel documents or…

You can find such things. Run this from the Terminal to find PDFs opened in the last 5 days:

mdfind -onlyin ~/ '((kMDItemLastUsedDate >= "459493200" && kMDItemLastUsedDate < "460011600") && kMDItemContentTypeTree == "com.adobe.pdf"cd)'

Turning that information into a useful format is another thing — but doable.

You might be better off to create Smart-Folders in the Finder and use Keyboard Maestro macros to open them.

That would get you a pretty GUI.

There’s a way to create and save them such that they don’t show up in the Sidebar of Finder windows.


Chris, your use of mdfind got me to thinking about Spotlight.

If “recent” is today, this works in Spotlight:


if you want recent PDFs:

created:8/4/2015 .pdf

You could combine this with KM macros or text expanders to make it easier:
; ==> created:8/4/2015
;c.thisweek ==> created:8/3/2015-8/11/2015
;c.thismonth ==> created:8/1/2015-8/30/2015

and the same for modified date.

As I understand it, Spotlight in El Capitan will be a lot more powerful, and friendlier.

For more info see:
Make Spotlight Sing: Use Dates To Search Your Files [OS X Tips] | Cult of Mac

1 Like

Many thanks, yeah I think spotlight search in El Capitan 10.11 OS X would definitely be a great tool here. Cheers, Aly

Hey JM,

Well, I sure hope so. The syntax has been very poor for years, and the UI is still awkward. I use HoudahSpot when I need to do something complicated.

I’ve had Spotlight snippets in Typinator for years now and use them frequently.

date:>08/06/2015 # The date is always today's date.


BTW could you suggest a quite reliable solution, apart GUI Cmd ⌘ + Space, to send directly from KM the right (calculated) search string to the Spotlight search bar?

A related Spotlight point: I have tested the poor documented “-interpret” parameter of mdfind command and experienced trouble at least as French localized user…


I see your “apart GUI …”, but what’s wrong with aKM macro that does this:

  1. Calculate your search string
  2. Open Spotlight with “Type the CMD+SPACE Keystroke”
  3. Enter the Spotlight text with “Paste” search string

You may also want to checkout the KM Macro Library (under Windows menu).
It has a set of macros for Spotlight search.

You are SUPER STAR @JMichael - just got this from Macro Library. It works great indeed, many thanks. Aly

Inspired by our discussion above, I have built a single macro for using Spotlight search in a variety of ways, without having to remember all the syntax and keywords. This allows you to easily define "recent" differently and to select the document type ("kind") each time you execute the macro Take a look at this and let me know what you think:

I see your “apart GUI …”, but what’s wrong with aKM macro that does this:

Calculate your search string
Open Spotlight with "Type the CMD+SPACE Keystroke"
Enter the Spotlight text with “Paste” search string

Cmd ⌘ + Space depend of System shortcut setting…

And KM version 6.4.8 was not reliable for such things… but fortunately KM 7 is :smile:

Thanks for the recall of KM Macro Library.

– Alain

Wow, that is great @JMichaelTX - really superb - many thanks for this, that is exactly what I was looking for. That hot key is also very handy.

1 Like

I know this is an old thread, but I just ran across it in a search.

And yes, a KM macro can bring up recent docs in any app.
Here's my macro:

1 Like