0

I'm trying to use osascript to get the list of applications that appear in the application switcher (forgive me if that's not the correct name, but what appears when you run cmd + tab)

osascript -e 'tell application "System Events" to get the name of every process whose background only is false'

This osascript line returns the right list of applications, but not in the correct order. I'd like the last element of the list to be the last application in the application switcher.

I'm open to not using osascript if there's a better way to do this.

ladder
  • 189
  • 2
  • 9

0 Answers0