Re: [python-win32] terminateprocess, getprocessid and compiling trunk on win32

2007-05-15 Thread Mark Hammond
These appear to be a reposts of the message you sent on May 11, which I also answered on that same day (notwithstanding time zones!) Mark > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Benjamin Deboute > Sent: Thursday, 10 May 2007 5:56 PM > To: pytho

Re: [python-win32] HookMessage fails

2007-05-15 Thread Mark Hammond
> > This is the magic of MFC - if no parent is specified, the > "main window" for > > the application is automatically used. > > > > Isn't that the issue, then? He's writing a dialog to plug in to > Explorer, and every time he runs, there's a different "main window". > MFC gets its concept of a "m

[python-win32] terminateprocess, getprocessid and compiling trunk on win32

2007-05-15 Thread Benjamin Deboute
Hi Pythonistas, i'm currently building a multi-platform renderfarm application, and would need to use GetProcessId to circumvant problems i encounter when i try to kill processes on win32 IE: i can't kill with TerminateProcess a process i spawned with CreateProcess (getting a Acess Denied erro

Re: [python-win32] HookMessage fails

2007-05-15 Thread Tim Roberts
Mark Hammond wrote: >>> I don't see the parent being passed into the dialogs in pywin32's >>> sample code. Is this going to be a problem? >>> >> Well, in looking at the code, I don't even see a way to >> specify one, so >> this seems to have been a rat hole. >> >> I'm mildly surprised by tha

Re: [python-win32] HookMessage fails

2007-05-15 Thread Mark Hammond
> > I don't see the parent being passed into the dialogs in pywin32's > > sample code. Is this going to be a problem? > > Well, in looking at the code, I don't even see a way to > specify one, so > this seems to have been a rat hole. > > I'm mildly surprised by that. The CreateDialog APIs all take

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Michael March
>>> mybug.Field("BG_DESCRIPTION")= "123" SyntaxError: can't assign to function call On 5/15/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > Michael March wrote: > > Here is another example in context: > > > mybug.Field("BG_DESCRIPTION") > > > u'Test Set: Mercury Tours UI\nTest: [1]Welcome P

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Tim Roberts
Michael March wrote: > Here is another example in context: > mybug.Field("BG_DESCRIPTION") > u'Test Set: Mercury Tours UI\nTest: [1]Welcome Page\nRun: > Run_9-11_11-43-36\nSte > p: Forms\n\nDescription:\nCheck the forms on the page:\n- Input fields\n > - Lists\n- Radi

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Michael March
Here is another example in context: >>> import win32com.client >>> td = win32com.client.Dispatch("TDApiOle80.TDConnection.1") >>> td.InitConnectionEx( "http://myserver.com:8080/qcbin/"; ) >>> td.ConnectProjectEx("TM_PLAY_AREA", "TM_PlayArea", "user", "passwd") >>> bfact = td.BugFactory >>> mybug=b

[python-win32] terminateprocess, getprocessid and compiling trunk on win32

2007-05-15 Thread Benjamin Deboute
Hi Pythonistas, i'm currently building a multi-platform renderfarm application, and would need to use GetProcessId to circumvant problems i encounter when i try to kill processes on win32 IE: i can't kill with TerminateProcess a process i spawned with CreateProcess (getting a Acess Denied erro

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Michael March
Ok.. here is the VB example .. (this is for / provided by HP's Quality Center help file..) Sub LinkDefects() 'This example creates two defects and links them Dim BugF As BugFactory Dim Bug1 As Bug ' tdc is a TDConnection. The user is authenticated and ' connected to the project befor

Re: [python-win32] HookMessage fails

2007-05-15 Thread Tim Roberts
TK Soh wrote: > > Actually I didn't specify any parent at all: > > class MyDialog(Dialog): >def __init__(self, title=None, tmpl=None): >self.title = title >if tmpl is None: >tmpl = dlg_template() >Dialog.__init__(self, tmpl) > > I don't see the parent being p

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > > > Thanks for the info, but I'm not sure about Platform SDK. I started > > doing this windows thing directly with python32. > > > > The HookMessage is called in OnInitDialog(), so I presumed is called > > every time a new dialo

Re: [python-win32] HookMessage fails

2007-05-15 Thread Tim Roberts
TK Soh wrote: > > Thanks for the info, but I'm not sure about Platform SDK. I started > doing this windows thing directly with python32. > > The HookMessage is called in OnInitDialog(), so I presumed is called > every time a new dialog is created (I'm very new to windows > programming): Yes, it is

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Tim Roberts <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > The hooks are working, so I guess PYWIN_WITH_WINDOWPROC support has > > indeed been compiled into ActivePython. The only problem now is the > > strange behavior when sometime the hooks don't get triggered. Any > > suggestion on

Re: [python-win32] HookMessage fails

2007-05-15 Thread Tim Roberts
TK Soh wrote: > The hooks are working, so I guess PYWIN_WITH_WINDOWPROC support has > indeed been compiled into ActivePython. The only problem now is the > strange behavior when sometime the hooks don't get triggered. Any > suggestion on workaround? > Where do you call HookWindow? Are you call

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Niki Spahiev <[EMAIL PROTECTED]> wrote: > >> In order to hook more messages (e.g. WM_SIZE) you must recompile pywin32 > >> with PYWIN_WITH_WINDOWPROC defined > > > > I'm confused. The hooks appeared to work fine, though only in the > > dialog opened from the specific explorer window as

Re: [python-win32] HookMessage fails

2007-05-15 Thread Niki Spahiev
>> In order to hook more messages (e.g. WM_SIZE) you must recompile pywin32 >> with PYWIN_WITH_WINDOWPROC defined > > I'm confused. The hooks appeared to work fine, though only in the > dialog opened from the specific explorer window as I described > earlier. I've tried WM_SIZE, WM_ACTIVATE, etc.

Re: [python-win32] HookMessage fails

2007-05-15 Thread TK Soh
On 5/15/07, Niki Spahiev <[EMAIL PROTECTED]> wrote: > TK Soh wrote: > > Greeting. > > > > I built a custom dialog which would be resized by a handler connected > > with HookMessage() to win32con.WM_SIZE. The dialogs are actually > > called from the shell extension's context menu. Every seemed to wo

Re: [python-win32] translating VB into Python...

2007-05-15 Thread Tim Golden
Michael March wrote: > When you do: > > object.Field("UserDefined_01") > > ... the output is a unicode object.. So putting: > >object.Field("UserDefined_01").Value > > .. barfs.. > > I'm obviously missing something here.. Not seeing the exact code you're using, so I could be wrong, b

Re: [python-win32] HookMessage fails

2007-05-15 Thread Niki Spahiev
TK Soh wrote: > Greeting. > > I built a custom dialog which would be resized by a handler connected > with HookMessage() to win32con.WM_SIZE. The dialogs are actually > called from the shell extension's context menu. Every seemed to work > well at first. > > The I noticed the resize handler is on