PythonCOM Problem: Automating WinFAX from Python

Tino Lange tl_news at nexgo.de
Thu May 23 13:49:26 EDT 2002


On Thu, 23 May 2002 15:16:24 +0100, Stefan Schukat
<SSchukat at dspace.de> wrote:

>>The Problem is that the COM Objects are all in "WinFax Automation Server 1.0"
>>and the one I want to use is for example "WinFax.SDKSend" or
>>"WinFax.SDKPhonebook"
>>
>>I can create the gen_py wrapper for the "WinFax Automation Server" but then
>>it doesn't detect that "WinFax.SDKSend" is one of those objects and binds it
>>dynamically.


>to use the function non dynamically the following could work.
[...]

YES, YES, YES!!!!
Great! Now it works! I'm happy!

This small script can query the "AutoRecieve" Status of WinFax:

from win32com.client import gencache
Module =
gencache.EnsureModule("{808D9041-49C1-11CE-A7FB-444553540000}", 0x0,
1, 0)
sendobj = Module.CSDKSend() # instead of
win32com.client.dynamic("WinFax.SDKSend")
appObj = Module.COleWinFaxApp(sendobj.Application)
Device = "Microlink Office" # my modem... (you can query yours with
"GetDeviceList")
Status = -1
Result, Status = appObj.GetAutoReceive(Device, Status)
print "Result", Result, ", Status: ", Status

Thanks a lot for your help!

Tino




More information about the Python-list mailing list