Is this what you wanted? It shows the name of the executable file that created the window that's currently in the foregound, however disallows showing all processes listed in the array named "Exclude".
Edit: Sorry, i didn't read the first post. This isn't what you want, but still kinda cool