Quick question

How to know if AD was shown?
How to make it so if AD was shown than do something?