SendKeys and Python 2.7

Jakson A. Aquino jaksonaquino at gmail.com
Tue Sep 14 01:57:37 CEST 2010


On Mon, Sep 13, 2010 at 4:02 PM, Michel Claveau - MVP
<enleverLesX_XXmcX at xmclavxeaux.com.invalid> wrote:
> Re!
>
> Sorry for time, but I am very busy...
>
>
> With Python + Pywin32, you can force the activation of a window (before
> send some keys...)
> See:
>  win32gui.SetForegroundWindow(w_handle)
>
> or
>  win32gui.SetActiveWindow(w_handle)
>
>
>
> For to find a windows (and his handle), see:
>  win32gui.EnumWindows()
>  win32gui.GetWindowTex()
> or
>  win32gui.FindWindowEx()

Thanks! I have found a simple workaround: sending Alt+Tab to R
Console. Tomorrow I will test your solution. I can't do it right now
because I don't have a real machine running Windows here.

Best regards,

Jakson



More information about the Python-list mailing list