Batch code does not do Windows; sad but true. This snippet may help:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "C:\Plasma\ACD_Refresh.acsauto",,True
Wscript.Sleep 2000
WshShell.Run "C:\Plasma\Test_ACD_Report.xls",,False
Refresh
Sub Refresh()
rc = WshShell.Run("C:\Plasma\ACD_Refresh.acsauto",,False)
If rc <> 0 Then
WshShell.AppActivate "[highlight]error box windows title goes here[/highlight]"
WScript.Sleep 1000
WshShell.SendKeys "~"
End if
WScript.Sleep 20000
Refresh
End Sub
Replace the highlighted text with the real title of the error box. Save the script with a vbs extension and run from the command prompt as wscript scriptname.vbs
Good luck 8-)
PS. I couldn't test this obviously so be prepared for the script to have errors. I assumed acsauto returned a non-zero return code when it failed. We all know what happens to people who assume.