Automating response to Error msg

Hello,

I am trying to make a macro that will find corrupted files.

The macro runs thru my files, and trys to load each of the *.SLDDRW files.

If the file is not corrupted then it moves on to the next file.

If the file IS corrupted  - when Solidworks tries to open any of these corrupted files - I get an Error msg and I have to click the OK button to dismiss the error msg for the macro to go on.

Is there any way to automate this "OK-clicking" ? I have hundreds of files to test and I would like the macro to be fully automated.(i.e. not having to have a person waiting for the error to pop-up and clicking OK each time)

I have tried using the "sendkeys" command to send an "ENTER" but it has no affect on the error msg.

SolidworksApi macros