vendredi 31 juillet 2015

What OS X events can I access programatically from swift?

I'd like to find both current running programs (or at least program in the foreground) programmatically - and also key events on OS X.

I found inter-application communication guidelines, but they don't seem to say I can find out what applications are running.

I've found key events, but it seems to imply that the current task in the forefront is the one that gets the key events and only if it doesn't handle them does it go up to event chain. I'd like to programmatically intercept them.

Seems dubious, I know. I'm trying to use key events along with screen captures to try to best learn text on the screen - it's for research.

I'm using swift, but I understand that an obj-c example is pretty helpful since they all use the same libraries.

Aucun commentaire:

Enregistrer un commentaire