I have written a VBScript that uses Send Keys to automate an application. The application dials out to download files and this process of dialing out is initiated within the application. The issue I am having is that the modem occationally fails to dail out and as a result of this there is a message box which pops up resulting in the rest of send keys keystrokes going crazy.
Is there a solution in VB which will check the activation of this message box once the send keys initiate the modem dialup and keep looping till around 5 min which will be the max time the modem will take to dialout.
I need to add error handling so that only on the apperance of this message box which will indicate the failure of the modem to dailout will the Enter sendkey will be sent and the whole routine restarted..