NSRunningApplication, return list of recently used applications?

前端 未结 2 1407
孤街浪徒
孤街浪徒 2021-01-06 18:27

I\'m trying to get a list of the most recently used applications. NSWorkspace returns a list of active applications and I can sort them on a few options using <

2条回答
  •  长发绾君心
    2021-01-06 19:13

    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.

提交回复
热议问题