Check if app is in panel state?

Hi!

I use the “display alert” command to show a alert panel and this puts the app in “panel state”.
Now surely there must be a way to check this programmatically. Something like: is app in panel state.

Thanks!

/Sebastian