I am trying to find a way to write a "software sensor" in Java, running on Mac OS X (10.5), which records every application focus change.
My first idea was to write a “traction sensor” that uses Applescript, which simply returns the name of the application. it is in focus. Obviously this approach is not very good.
Therefore, I was wondering if it was possible to get a callback or some kind of notification directly from the operating system when another application gets into focus.
Thanks in advance! Cheers julian
Julian Seifert
source
share