python - finding the app window currently in focus on Mac OSX -


i writing desktop usage statistics app. runs background daemon wakes @ regular intervals, finds name of application window in focus , logs data in database.

i manage on linux desktop of xprop utility (you can find here).

how can same on mac osx? there direct/indirect way python script? (pyobjc?)

you can applescript:

get title of current active window/document in mac os x

you can try using appscript generate applescript events python.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -