Photoshop - Applescript - warning dialog - catch problem…

Hallo there,
for whole afternoon I tryed to figure out one problem.

I have set of pre-recorded actions in Photoshop. Then I have applescript that is launching sets of them in batch for some set of images. The problem I have has name “WARNING dialog”. When Photoshop encounters some error ie. FILE NOT FOUND or NOT ENOUGH FREE MEMORY it returns that error back to applescript. So far it’s ok. I can catch that error and handle it. But… what to do with warning dialogs ie. “Warning: No pixels was selected.” followed by only one check box “Don’t show again” and default “OK” button. This one - IS NOT AN ERROR. It’s a warning only. Nothing is returned back to applescript. So Photoshop is waiting for user interaction and script’s halted too. I can check checkbox manually for every error I could possibly get and than photoshop is quiet next time this happens but and that’s my problem: MY SCRIPT CAN’T CATCH this event. So it is following code flow and executing next action and has no idea what happend. The flow is broken (for example instead of applying filter on some selection it is applied to whole image instead of ignoring it when we have no selection available etc.) And user has no idea that something happend.

Any Idea how to solve this? How to catch this WARNING and let my applescript handle it?

Plsss help.
Thnx a lot.

PS CS3, Leopard 10.5.4

Oh, I forgot: set display dialogs to never is not the sollution.