[python-win32] Get path of the current open document of the current active application

Marte Soliza myrtactle at gmail.com
Wed Sep 21 20:35:52 CEST 2011


Hello,

I'm looking for a way to, first, determine the current active application
(i.e. the one with the top-most window). I think I got this now, but I'm not
sure how much of this will help in my final goal which is to get the path of
the current open document (for those that have them).

I believe there is no single way to do this that will work for all
applications, but is there a way to do this for most applications? Is there
some convention that most applications follow to define what their current
document is?

If there's no general way, I'm willing to do this on an app-to-app basis
starting with, say, MS Word.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110922/a9416588/attachment.html>


More information about the python-win32 mailing list