Replying to "Faster way of checking if dialog has closed?"