You can download and use Auto it. Following is the sample of the script that waits for a pop up title and then close it when appears.
While 1 $activeWindowTitle = WinGetTitle(WinActive("")); If ($activeWindowTitle == "popuptitle") Then WinClose("popuptitle"); EndIf sleep(500)WEnd