Windows dialog box removal

Thomas Heller theller at python.net
Thu Sep 25 11:39:45 EDT 2003


Dave Brueck <dave at pythonapocrypha.com> writes:

> On Thursday 25 September 2003 06:18 am, SectorUnknown wrote:
>> I've written a Python script that runs a MS Windows program using popen.
>> However, at the end of the Windows program, a dialog box appears and
>> asks for the user to click on OK.
>>
>> Is there a way to have Python set focus on the dialog box and click OK
>> so my script can continue?
>>
>> Does anyone have an example?
>
> I wouldn't be surprised if there's an easier or more correct way to do this, 
> but if you can reliably know the title of the window then the code below 
> should work (assuming you have ctypes installed):
[example snipped]

I've added this example to the ctypes wiki, so it will not be lost. Hope
that's ok ;-)

<http://starship.python.net/crew/theller/moin.cgi/CtypesLinks>

Thomas




More information about the Python-list mailing list