>I can get all the processes running in a Mac. But I want to get only those that are applications - those who are listed in activity monitor as "Windowed Processes" or those you see in "Force Quit" list (Command+Option+Esc). > >PS: I prefer Go but language is not that much important.
I've never used Mac OS X, but from what I understand:
Mac OS X 10.5+ is UNIX-compliant (except 10.7) and POSIX-compliant so you can use standard UNIX and POSIX functions to access live OS information. The UNIX command ps aux is one example. You can examine the various codes / flags output for each process. One of them indicates if it's a background or foreground process. Other UNIX commands provide similar information.