This is probably a simple question but for part of a larger process Acrobat Pro opens crops a PDF saves and closes. Occasionally I get an error that pops up. Unfortunately it does not cause the process to stop and the script continues to attempt to crop other PDF's. All I want to do is have the script check if there are any alerts/dialog boxes on the screen and then stop.
What is the syntax in AppleScript to check for dialog boxes/alerts?