Radu Ciora wrote:
> ,
> so my question would then  be how can I get the running objects which I can 
> see from the combrowser.py?
> 'cos for example I have an object in the combrowse  called "D:\Temp\my.pdf" 
> which is an adobe acrobat instance.
> I want to be able to get that document's name&path.
>   

In the specific case of Acrobat, you can use the Running Object Table to
do this.

    rot = pythoncom.GetRunningObjectTable()
    ctx = pythoncom.CreateBindCtx(0)
    enu = rot.EnumRunning()
    for ob in rot.EnumRunning():
        print ob.GetDisplayName( ctx, None ), ob.GetClassID()

You can use the GetClassID GUID to figure out which application it is,
but checking for ".pdf"; in the display name is probably enough.

This does not work in the general case, however.  Few applications
register themselves in the ROT.  What are you going to do with this
information?

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to