Getting callback from OS X When does the Foucs application change?

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

+3
source share
1 answer

java , . , OSX SDK -, . java ( JNI JNA).

+1

Source: https://habr.com/ru/post/1713134/


All Articles