473,378 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

win32com and DispatchWithEvents

Greetings,

I'm trying to get DispatchWithEvents() to work with HyperAccess
(terminal program) without much success. I've done a bunch of
searching and found some examples using IE:

This works but doesn't handle the "Event Driven Functions":
haObj = win32com.client.Dispatch(r"HAWin32")

And so does this Internet Explorer Example:
ieObj = win32com.client.DispatchWithEvents
("InternetExplorer.Application", ExplorerEvents)

But this does not:
haObj = win32com.client.DispatchWithEvents("HAWin32", HAEvents)
It fails with the error message:
"TypeError: This COM object can not automate the makepy process -
please run makepy manually for this object"

After some searching I tried:
mod = win32com.client.gencache.EnsureModule('{5178CCE1-AAEF-11CE-
AE75-00AA0030EBC8}', 0, 1, 0)
haObj = win32com.client.DispatchWithEvents(mod, HAEvents)
Which fails with the error message:
ttributeError: 'module' object has no attribute 'GetTypeInfo'

So I tried this approach with IE:
mod = win32com.client.gencache.EnsureModule('{EAB22AC0-30C1-11CF-
A7EB-0000C05BAE0B8}', 0, 1, 0)
ieObj = win32com.client.DispatchWithEvents(mod, ExplorerEvents)
But this too breaks with the same GetTypeInfo error.
Any ideas or resources? I can provide the genpy output if that helps.
Nov 13 '08 #1
2 10402
On Nov 13, 10:27*am, RyanN <Ryan.N...@gmail.comwrote:
Greetings,

I'm trying to get DispatchWithEvents() to work with HyperAccess
(terminal program) without much success. I've done a bunch of
searching and found some examples using IE:

This works but doesn't handle the "Event Driven Functions":
haObj = win32com.client.Dispatch(r"HAWin32")

And so does this Internet Explorer Example:
ieObj = win32com.client.DispatchWithEvents
("InternetExplorer.Application", ExplorerEvents)

But this does not:
haObj = win32com.client.DispatchWithEvents("HAWin32", HAEvents)
It fails with the error message:
"TypeError: This COM object can not automate the makepy process -
please run makepy manually for this object"

Did you try the makepy process? I haven't used it lately, but I seem
to recall it was easy to use...

>
After some searching I tried:
mod = win32com.client.gencache.EnsureModule('{5178CCE1-AAEF-11CE-
AE75-00AA0030EBC8}', 0, 1, 0)
haObj = win32com.client.DispatchWithEvents(mod, HAEvents)
Which fails with the error message:
ttributeError: 'module' object has no attribute 'GetTypeInfo'

So I tried this approach with IE:
mod = win32com.client.gencache.EnsureModule('{EAB22AC0-30C1-11CF-
A7EB-0000C05BAE0B8}', 0, 1, 0)
ieObj = win32com.client.DispatchWithEvents(mod, ExplorerEvents)
But this too breaks with the same GetTypeInfo error.

Any ideas or resources? I can provide the genpy output if that helps.
There's the PyWin32 user's group, where the maintainers of PyWin32
hang out and answer questions:

http://mail.python.org/mailman/listinfo/python-win32

Mike
Nov 13 '08 #2
On Nov 13, 2:16*pm, Mike Driscoll <kyoso...@gmail.comwrote:
On Nov 13, 10:27*am, RyanN <Ryan.N...@gmail.comwrote:
Greetings,
I'm trying to get DispatchWithEvents() to work with HyperAccess
(terminal program) without much success. I've done a bunch of
searching and found some examples using IE:
This works but doesn't handle the "Event Driven Functions":
haObj = win32com.client.Dispatch(r"HAWin32")
And so does this Internet Explorer Example:
ieObj = win32com.client.DispatchWithEvents
("InternetExplorer.Application", ExplorerEvents)
But this does not:
haObj = win32com.client.DispatchWithEvents("HAWin32", HAEvents)
It fails with the error message:
"TypeError: This COM object can not automate the makepy process -
please run makepy manually for this object"

Did you try the makepy process? I haven't used it lately, but I seem
to recall it was easy to use...
After some searching I tried:
mod = win32com.client.gencache.EnsureModule('{5178CCE1-AAEF-11CE-
AE75-00AA0030EBC8}', 0, 1, 0)
haObj = win32com.client.DispatchWithEvents(mod, HAEvents)
Which fails with the error message:
ttributeError: 'module' object has no attribute 'GetTypeInfo'
So I tried this approach with IE:
mod = win32com.client.gencache.EnsureModule('{EAB22AC0-30C1-11CF-
A7EB-0000C05BAE0B8}', 0, 1, 0)
ieObj = win32com.client.DispatchWithEvents(mod, ExplorerEvents)
But this too breaks with the same GetTypeInfo error.
Any ideas or resources? I can provide the genpy output if that helps.

There's the PyWin32 user's group, where the maintainers of PyWin32
hang out and answer questions:

http://mail.python.org/mailman/listinfo/python-win32

Mike
Thanks. I had used makepy to get the class ID and yes it was easy to
use. I have asked on the python-win32 group as you suggested.

-Ryan
Nov 14 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Justin Stockton | last post by:
I recently upgraded from ActivePython 2.2.2 to ActivePython 2.3.2 and I'm running into an issue importing the win32com.client module. Before installing the new version, I made sure to properly...
3
by: RJ | last post by:
Hi, I've been going over the Quick Start to Client side COM and Python and many other sources, but cannot find an example that will get my com/ActiveX .ocx USB device driver imported. The Excel...
0
by: Andrew Perella | last post by:
Hi, Has anyone managed to hook into visual studio dot net build events (or any other events)? I can add my own button to a toolbar from python and handle that events due to...
0
by: Thomas Heller | last post by:
I'm currently reinventing the wheel ;-), implementing 'clones' for the win32com.client.Dispatch and DispatchWithEvents functions using ctypes. It works fairly well, although the more complicated...
1
by: Tom Willis | last post by:
Just a general question. It seems in COM late binding is something that should be avoided if possible. Because python seems to be really good at doing thing dynamically I'm wondering why no...
0
by: ccahoon | last post by:
Traceback (most recent call last): File "windowedfax.py", line 223, in OnClick self.iexplore = DispatchWithEvents("InternetExplorer.Application", eventHandling) File...
0
by: Chandra | last post by:
Hi, I tried the following: >>> from win32com.client import DispatchWithEvents >>> class BackupEvent: .... def OnPercentComplete(self, sMessage, nPercent): .... print sMessage,...
0
by: puff | last post by:
I'm working on a com automation project involving IE (yes, I know about Pamie). I connect to IE through DispatchWithEvents, start a navigation, and then loop calling PumpWaitingMessages. I see...
0
by: Ken Harvey | last post by:
I am attempting to scan a Windows Active Directory using wincom32.client and LDAP to pull a list of users and their attributes. My problem is that I am unable to get the search working: import...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.