tags:

views:

42

answers:

1

i'm trying to get a list of the most recent used applications. NSWorkspace returns me a list of active applications and i can sort them on a few options using NSRunningApplication. see list below:

  • launchDate
  • finishedLaunching
  • processIdentifier

i dont want the lauch date but the recent 'active' date (like the way cmd-tab sorts). Does anyone knows the solution for this?

+2  A: 

There is no documented way of doing this that I'm aware of, but I wrote exactly what you are asking for using private APIs: http://gist.github.com/163918

Also, see Getting the list of running applications ordered by last use for solutions that do not use private APIs.

0xced
hi 0xced, thanks for your answer, i will look into both solutions, it looks very promising!
Martijn