willwatters Posted December 24, 2004 Share Posted December 24, 2004 (edited) For the AdlibEnable() function I have used the following at the start of my script: ;/* check for unforeseen errors every 250 MS (i.e. checks for an error window to pop up unpredictably, etc) AdlibEnable("myadlib") Func myadlib() If WinActive("Error") Then MsgBox(48, "Error Found", "Unexpected error occurred") Exit WinClose("BAJI/CACI Jury Instruction Selector for Windows") WinClose("Jury Instruction Selector") WinClose("New Instruction Set") WinClose("BAJI/CACI Jury Instruction Selector for Windows [instructions Not Saved]") EndIf EndFunc Will this work (check for unforeseen errors every 250 MS (i.e. checks for an error window to pop up unpredictably, etc)) and is there any other code I need to enter here please? Is there also a way of capturing the type of error in order to display it in the MsgBox? Edited December 24, 2004 by willwatters Link to comment Share on other sites More sharing options...
Chris_1013 Posted December 24, 2004 Share Posted December 24, 2004 Well, firstly you need to remove that Exit line, else the WinClose lines will not execute cos you've exited the script. In terms of capturing the error, without knowing what the window looks like I wouldn't know, but there may be some text on the window you can grab. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now