Getting the list of running applications ordered by last use

前端 未结 4 623
长情又很酷
长情又很酷 2020-12-03 00:14

I\'d like to get the list of running applications in the same order they appear when doing ⌘ + ⇥

I.e. if I use TextEdit, then Preview

4条回答
  •  借酒劲吻你
    2020-12-03 00:45

    It is impossible to get the list before your application launches. After you start the application though, you can just register for notifications and maintain your own array of applications.

    The only solution is to start a background process at login using launchd that simply listens for applications.

提交回复
热议问题