Re: win32event.WaitForInputIdle() returns too soon




<kyosohma@xxxxxxxxx> schreef in bericht
news:1183148539.304679.77690@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 29, 3:03 pm, "Hans" <NoS...@xxxxxxxxx> wrote:
"Gabriel Genellina" <gagsl-...@xxxxxxxxxxxx> schreef in
berichtnews:mailman.184.1183090500.22759.python-list@xxxxxxxxxxxxx



En Thu, 28 Jun 2007 19:15:40 -0300, Hans <NoS...@xxxxxxxxx> escribió:

I'm sending keyboard and mouse events to a seperate windows
application.
I use win32event.WaitForInputIdle() before calling e.g.
win32api.keybd_event()
However it seems that WaitForInputIdle() returns too soon because some
of my
events get lost. Now I'v created my own WaitForInputIdle() which calls

From the Microsoft docs for WaitForInputIdle: "The WaitForInputIdle
function only works with GUI applications. If a console application
calls
the function, it returns immediately, with no wait."
A typical Python script is a console application.

--
Gabriel Genellina

It would explain my problem.
Perhaps I could create a small windows application as interface..
I have to think about it ( and wait, as I currently don't have access to
visual C++, nor the MS documentation)

Thanks,
Hans

: Who says you have to create it with Visual C++? You could use Tkinter
: or wxPython. Both are pretty easy to pick up and can look professional
: with a little work.

: Mike


Nobody.
However, yesterday I tried wrapping my piece of offending code into a very
simple Tkinter application.
Alas, the problem wasn't solved. WaitForInputIdle() returns too soon
(unless I don't understand WaitForInputIdle(), which is actually a Microsoft
call.
Therefore using Visual Studio is sometimes handier: doc available and most
compatible with Microsoft's quirks)

Any other suggestions are welcome.

Cheers, Hans


.



Relevant Pages

  • Re: win32event.WaitForInputIdle() returns too soon
    ... I use win32event.WaitForInputIdlebefore calling e.g. ... However it seems that WaitForInputIdle() returns too soon because some ... events get lost. ... A typical Python script is a console application. ...
    (comp.lang.python)
  • Re: win32event.WaitForInputIdle() returns too soon
    ... I use win32event.WaitForInputIdlebefore calling e.g. ... However it seems that WaitForInputIdle() returns too soon because some of my ... events get lost. ... A typical Python script is a console application. ...
    (comp.lang.python)
  • Re: win32event.WaitForInputIdle() returns too soon
    ... However it seems that WaitForInputIdle() returns too soon because some ... A typical Python script is a console application. ... HANDLE hProcess, ... DWORD dwMilliseconds ...
    (comp.lang.python)
  • Re: win32event.WaitForInputIdle() returns too soon
    ... I use win32event.WaitForInputIdlebefore calling e.g. ... However it seems that WaitForInputIdle() returns too soon because some ... events get lost. ... A typical Python script is a console application. ...
    (comp.lang.python)