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?