My script runs a program that will eventually start an app that will prompt the user with a dialog box. I have a separate script that I can run using subprocess.call to hit the left arrow key and enter, but I need some way to make the script wait until the dialog box opens. Is there any way to make it wait until the box with a certain title prompts the user and then execute the script?
Essentially:
subprocess.Popen("java -jar file.jar", creationflags=subprocess.CREATE_NEW_CONSOLE, stdout=subprocess.PIPE)
#wait for dialog box of title "title"
subprocess.call("myscript.wsf")
Working in Windows 7. Thank you.