WWW_URLEcho with dde

Mike Clarkson support at internetdiscovery.com
Thu Dec 21 14:17:27 EST 2000

On Sun, 10 Dec 2000 13:36:24 GMT, Roger Abbott <rogerha at aol.com>

>In article <3a32b7e6.8685100 at>,
>  support @ internetdiscovery.com (Mike Clarkson) wrote:
>> Has anyone used the dde module in Python to register a URLEcho from
>> netscape or Internet Explorer? Looking at the source code to dde I see
>> comments about Netscape's use of poke, which indicates the author
>> may have been playing with URLEcho.
>> I'd like to start a dde server and register it with netscape to send
>> me an echo when it loads a web page. Has anyone done this?
>Yes, in VB. The web site below has a free WebSpy program which does it.
>It comes with source code, I am sure you can figure out how it works.

Thanks, but I was looking for a solution in Python with dde.py.

Here is what I tried: I can see the messages coming back from
Netscape, so the Echo has been registered, but Python takes no action.


import win32ui
from pywin.mfc import object
import dde

class MySystemTopic(object.Object):
	def __init__(self):
	def Exec(self, cmd):
		print "System Topic asked to exec", cmd

class MyPokeTopic(object.Object):
	def __init__(self, topicName):
	def Poke(self, cmd):
		print "Other Topic asked to poke ", cmd

class MyRequestTopic(object.Object):
	def __init__(self, topicName):
	def Request(self, cmd):
		print "Other Topic asked to poke ", cmd

server = dde.CreateServer()
print 'created myapp'

conversation = dde.CreateConversation(server)

conversation.ConnectTo("Netscape", "WWW_RegisterURLEcho")

s = '"MyApp"'
sl = conversation.Poke(s)
print 'Retval is "%s"'% s

del conversation

while 1:
	win32ui.PumpWaitingMessages(0, -1)

More information about the Python-list mailing list