Modal Dialog Freezes Script
Question:
I am attempting to automate the install of an application. However this application seems to
display a modal type dialog that seems to be suspending my script while it waiting for input
from the user. What can I do?
Answer:
Automating modal dialogs is tricky. Modal dialogs can 'shutdown all other user input' until a user
responds to that particular dialog.
First check that you can launch notepad while this dialog is on
the screen. Bring up the modal dialog, then go to your start menu and select
Start|Programs|Accessories|Notepad. Are you able to accomplish this? If not, then you will
not be able to automate this dialog.
If you are able to launch notepad, there may be a glimmer of hope. In the script, just before this modal dialog
appears, you can try launching a secondary script that attempts to send an Enter key to the dialog.
;Main_script.wbt
SendkeysTo("Install","!s")
RunWait("Modal_killer.wbt","")
etc...
;Modal_killer.wbt
WinWaitExist("Modal Install Window title",10)
SendkeysTo("Modal Install Window title","{ENTER}")
exit
Article ID: W16028
File Created: 2004:03:30:15:42:18
Last Updated: 2004:03:30:15:42:18