473,761 Members | 4,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

win32com and DispatchWithEve nts

Greetings,

I'm trying to get DispatchWithEve nts() 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"HAW in32")

And so does this Internet Explorer Example:
ieObj = win32com.client .DispatchWithEv ents
("InternetExplo rer.Application ", ExplorerEvents)

But this does not:
haObj = win32com.client .DispatchWithEv ents("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.Ensur eModule('{5178C CE1-AAEF-11CE-
AE75-00AA0030EBC8}', 0, 1, 0)
haObj = win32com.client .DispatchWithEv ents(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.Ensur eModule('{EAB22 AC0-30C1-11CF-
A7EB-0000C05BAE0B8}' , 0, 1, 0)
ieObj = win32com.client .DispatchWithEv ents(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 10526
On Nov 13, 10:27*am, RyanN <Ryan.N...@gmai l.comwrote:
Greetings,

I'm trying to get DispatchWithEve nts() 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"HAW in32")

And so does this Internet Explorer Example:
ieObj = win32com.client .DispatchWithEv ents
("InternetExplo rer.Application ", ExplorerEvents)

But this does not:
haObj = win32com.client .DispatchWithEv ents("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.Ensur eModule('{5178C CE1-AAEF-11CE-
AE75-00AA0030EBC8}', 0, 1, 0)
haObj = win32com.client .DispatchWithEv ents(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.Ensur eModule('{EAB22 AC0-30C1-11CF-
A7EB-0000C05BAE0B8}' , 0, 1, 0)
ieObj = win32com.client .DispatchWithEv ents(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...@gmai l.comwrote:
Greetings,
I'm trying to get DispatchWithEve nts() 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"HAW in32")
And so does this Internet Explorer Example:
ieObj = win32com.client .DispatchWithEv ents
("InternetExplo rer.Application ", ExplorerEvents)
But this does not:
haObj = win32com.client .DispatchWithEv ents("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.Ensur eModule('{5178C CE1-AAEF-11CE-
AE75-00AA0030EBC8}', 0, 1, 0)
haObj = win32com.client .DispatchWithEv ents(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.Ensur eModule('{EAB22 AC0-30C1-11CF-
A7EB-0000C05BAE0B8}' , 0, 1, 0)
ieObj = win32com.client .DispatchWithEv ents(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
5192
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 remove old version (as well as the mx libraries I had installed). I then installed the new version as a user with the Administrator role. I know I'm technically not supposed to install to a directory with a space in the name, but it worked fine for...
3
7024
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 and Word examples run fine. win32com.client.Dispatch("Excel.Application") etc., but how does one know the ("<foo>.<bar>") to type in? Excel looks only vaguely like "Excel.Application" in the com browser.
0
1341
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 DispatchWithEvents(item, ButtonEvent) working on a button item. Trying to use this with any other object tells me "This COM object does not support events." Clearly the vsdotnet supports events as all the sample code for c++/c#/vbmacros etc testify. Any help would...
0
1977
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 data types like SAFEARRAY or RECORD are not yet implemented. The win32com.client versions of these functions require makepy support (for DispatchWithEvents), and create this on demand. The ctypes versions don't require something similar, they...
1
2423
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 one has figured out how to make the functionality in makepy fire automagically when you need it. For example, it would be nice if you are creating an object repeatedly(ADODB.Recordset) that some logic would trigger whatever
0
1524
by: ccahoon | last post by:
Traceback (most recent call last): File "windowedfax.py", line 223, in OnClick self.iexplore = DispatchWithEvents("InternetExplorer.Application", eventHandling) File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 268, in DispatchWithEvents user_event_class.__init__(instance) File "windowedfax.py", line 178, in __init__ this.iexploreInstance = self NameError: global name 'this' is not defined
0
1493
by: Chandra | last post by:
Hi, I tried the following: >>> from win32com.client import DispatchWithEvents >>> class BackupEvent: .... def OnPercentComplete(self, sMessage, nPercent): .... print sMessage, nPercent
0
1845
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 the events OK and all is well. At some point it is clear that the navigation is complete (at least insofar as IE is no longer generating events). The code then goes off and does something else for a bit NOT making calls to PumpWaitingMessages. A...
0
1712
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 win32com.client, win32net strFQADDomainName = win32com.client.GetObject('LDAP://rootDSE').Get("defaultNamingContext") arrDomainObjects = win32com.client.GetObject("LDAP://" + strFQADDomainName + ">;(&(&(&(objectCategory=user)(name=*))))") When...
0
9336
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10111
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.