Re: [python-win32] message queue

2007-10-04 Thread Tim Roberts
Radu Ciora wrote: > My goal is to be able to say when a user clicks a Word toolbar button to be > able to "know" what that button was. So that I might provide some feedback or > something. > Unfortunately, that turns out to be virtually impossible. Most applications draw their windows by put

Re: [python-win32] message queue

2007-10-04 Thread Radu Ciora
ent: Thursday, 4 October, 2007 11:01:08 PM Subject: Re: [python-win32] message queue Radu Ciora wrote: > So you mean that I won't be able to see Word's message queue, right? > Not by using GetMessage, no. You wouldn't want to in any case, because GetMessage *removes* the messa

Re: [python-win32] message queue

2007-10-04 Thread Tim Roberts
Radu Ciora wrote: > So you mean that I won't be able to see Word's message queue, right? > Not by using GetMessage, no. You wouldn't want to in any case, because GetMessage *removes* the messages from the queue. If you COULD get them, then Word WOULDN'T get them, and the display would be scre

Re: [python-win32] message queue

2007-10-04 Thread Radu Ciora
So you mean that I won't be able to see Word's message queue, right? Regards, Radu. - Original Message From: Tim Roberts <[EMAIL PROTECTED]> To: Python-Win32 List Sent: Thursday, 4 October, 2007 10:06:28 PM Subject: Re: [python-win32] message queue Radu Ciora wrote: &

Re: [python-win32] message queue

2007-10-04 Thread Tim Roberts
Radu Ciora wrote: > I was trying to see how GetMessage function works. > I was trying with this basic app and later try to get message for MsWord. > The only messages you get with GetMessage are messages that arrived in your thread's message queue. You can monitor the message traffic within an

Re: [python-win32] message queue

2007-10-04 Thread Radu Ciora
python-win32] message queue Radu Ciora wrote: > Hi all, > > given this code: > > while 1: > time.sleep(1) > > l_hwnd = win32gui.GetForegroundWindow() > try: > msg = win32gui.GetMessage(l_hwnd, 0, 0) >

Re: [python-win32] message queue

2007-10-04 Thread Tim Roberts
Radu Ciora wrote: > Hi all, > > given this code: > > while 1: > time.sleep(1) > > l_hwnd = win32gui.GetForegroundWindow() > try: > msg = win32gui.GetMessage(l_hwnd, 0, 0) > print msg > except: > traceback.print_exc(

[python-win32] message queue

2007-10-04 Thread Radu Ciora
Hi all, given this code: while 1: time.sleep(1) l_hwnd = win32gui.GetForegroundWindow() try: msg = win32gui.GetMessage(l_hwnd, 0, 0) print msg except: traceback.print_exc() can anyone tell me what's wrong with it