How can i get a list of running applications in the same order they appear when doing ⌘ + ⇥ from within an applescript?
I.e. if I use TextEdit, then Preview, then iCal, the order is
iCal, Preview, TextEdit
This question which asked if there was an API that could produce this list provided this answer:
$ cd /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework
$ nm LaunchServices | grep __LSCopyApplicationArrayInFrontToBackOrder
But how can I access this list from within an applescript?
Not sure as how to order them But this lists applications that are not background only
tell application "System Events" to get the name of every process whose background only is false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With