I have some code at work that uses GlobalAtom to detect if a app is running. I'll try and dig it out and post an example.