Re: [python-win32] Creating python com objects

2008-04-25 Thread Alex Denham
Thats excellent Tim, I was just about to start digging around for information on how to get the data once it's dropped. Thanks for your help Alex > Date: Fri, 25 Apr 2008 17:16:34 +0100 > From: [EMAIL PROTECTED] > CC: python-win32@python.org > Subject: Re: [python-win32] Cr

Re: [python-win32] Creating python com objects

2008-04-25 Thread Tim Golden
Well, for those of you still watching this show (!) and just in case anyone comes along in the future with the same question, I attach below a small working example which will accept one or more files dropped onto its Window. It doesn't do anything with the files, bar pull their names from the rel

[python-win32] Creating python com objects

2008-04-25 Thread Roger Upole
Alex Denham wrote: I've had a look at the example and i can't quite pick out what's being done differently other than pythoncom.WrapObject() is being called within a class and it's being called on the > class it's in? Or is it something to do with the arguments passed to wrap object? Thanks for

Re: [python-win32] Creating python com objects

2008-04-25 Thread Alex Denham
Thanks for the help. Alex > From: [EMAIL PROTECTED] > To: python-win32@python.org > Date: Thu, 24 Apr 2008 17:25:03 -0400 > Subject: [python-win32] Creating python com objects > > > Tim Golden wrote: > > Alex Denham wrote: > >> Parameters > >&

[python-win32] Creating python com objects

2008-04-24 Thread Roger Upole
Tim Golden wrote: Alex Denham wrote: Parameters /pDataObj/ : *PyIDataObject ** How do i link the IDataObject to the IDragTarget? I don't know that you can, if you're asking: how do I find out where this is coming from?. I think the drag-drop technique is endpoint-agnostic. (A high-so

Re: [python-win32] Creating python com objects

2008-04-24 Thread Alex Denham
programming in general. Thanks Tim, and everyone else on the mailing list. Alex > Date: Thu, 24 Apr 2008 20:28:42 +0100 > From: [EMAIL PROTECTED] > CC: python-win32@python.org > Subject: Re: [python-win32] Creating python com objects > > Alex Denham wrote: > > > >

Re: [python-win32] Creating python com objects

2008-04-24 Thread Tim Golden
Alex Denham wrote: Thanks Tim, the program actually reacts when something is dragged over (much better than before). However i'm receiving an error everytime. >>> pythoncom error: Unexpected exception in gateway method 'DragEnter' : DragEnter pythoncom error: Unexpected gateway error I've

Re: [python-win32] Creating python com objects

2008-04-24 Thread Alex Denham
in the documentation it says: Drop(pDataObj, pt, dwEffect) Parameters pDataObj : PyIDataObject * How do i link the IDataObject to the IDragTarget? Thanks Alex > Date: Thu, 24 Apr 2008 12:11:12 +0100> From: [EMAIL PROTECTED]> CC: > python-win32@python.org> Subject:

Re: [python-win32] Creating python com objects

2008-04-24 Thread Tim Golden
Alex Denham wrote: class PyIDropTarget: _public_methods_ = ['DragEnter', 'DragOver', 'DragLeave', 'Drop'] _reg_progid_ = "Python.PyIDropTarget" _reg_clsid_ = '{0122---C000-0046}' def DragEnter(self, args=None): print 'DragEnter: ', args def DragOver

Re: [python-win32] Creating python com objects

2008-04-24 Thread Alex Denham
2:30 -0400 > Subject: [python-win32] Creating python com objects > > Alex Denham wrote: > > class PyIDropTarget: > _public_methods_ = ['DragEnter', 'DragOver', 'DragLeave', 'Drop'] > _reg_progid_ = "Python.PyIDropTarget&qu

[python-win32] Creating python com objects

2008-04-24 Thread Roger Upole
Alex Denham wrote: class PyIDropTarget: _public_methods_ = ['DragEnter', 'DragOver', 'DragLeave', 'Drop'] _reg_progid_ = "Python.PyIDropTarget" _reg_clsid_ = '{0122---C000-0046}' def DragEnter(self, args=None): print 'DragEnter: ', args def DragOver(self,

Re: [python-win32] Creating python com objects

2008-04-24 Thread Alex Denham
thing to register it, then i tried dropTarget = win32com.client.Dispatch("Python.PyIDropTarget") I didn't know about the pythoncomWrapObject however. > From: [EMAIL PROTECTED] > To: python-win32@python.org > Date: Wed, 23 Apr 2008 21:15:56 -0400 > Subject: [python-win32]

[python-win32] Creating python com objects

2008-04-23 Thread Roger Upole
Alex Denham wrote: Hi, Anybody happen to know how to go about creating a COM object that RegisterDragDrop() will actually accept? print dropTarget pythoncom.RegisterDragDrop(_id, dropTarget) Traceback (most recent call last): File "C:\Python25\DragAndDrop.py", line 82, in main()

Re: [python-win32] Creating python com objects

2008-04-23 Thread Alex Denham
p. Thanks Alex From: [EMAIL PROTECTED] Date: Wed, 23 Apr 2008 07:33:16 -0400 To: python-win32@python.org Subject: Re: [python-win32] Creating python com objects I might be greatly misinterpreting what you're trying to do here, but RegisterDragDrop registers a window, not

Re: [python-win32] Creating python com objects

2008-04-23 Thread Dahlstrom, Roger
EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Denham Sent: Wednesday, April 23, 2008 7:18 AM To: python-win32 Subject: [python-win32] Creating python com objects Hi, Anybody happen to know how to go about creating a COM object that RegisterDragDrop() will actually accept?

[python-win32] Creating python com objects

2008-04-23 Thread Alex Denham
Hi, Anybody happen to know how to go about creating a COM object that RegisterDragDrop() will actually accept? print dropTarget pythoncom.RegisterDragDrop(_id, dropTarget) Traceback (most recent call last): File "C:\Python25\DragAndDrop.py", line 82, in main() File "C:\Python25\DragA