[Tutor] Mouse clicking

Alan Gauld alan.gauld at btinternet.com
Sat Jun 30 23:57:19 CEST 2007


"elis aeris" <hunter92383 at gmail.com> wrote 

> BOOL EnumWindows(
>    WNDENUMPROC lpEnumFunc, // pointer to callback function
>    LPARAM lParam  // application-defined value
>   );
> 
> I am not sure what this is for @_@

If you don't know the window class/title in advance you 
can get a list of all open windows and apply a function 
of your own devising to each one till you find the one 
you want. The enumeration will stop when your function 
returns FALSE

> with pywin32, shouldn't
> 
> win32api.keybd_event
> win32api.GetFocus
> win32api.mouse_event

Possibly, but I though GetFocus would require your own app 
take focus whereas Lisa wanted to post the mouse events 
to another window which already had focus.

mouse_event is a new one to me and yes, it looks like it might 
be even easier to use.

As ever when programming Windioze its best to ty a few 
experiments...

Alan G



More information about the Tutor mailing list