You can use an OnLayoutExit Script Trigger to halt their exit from the layout and prevent the window from closing.
That is a good suggestion,and maybe I am not using the correct script step. They click out and my message pops up, they clear the message, the app exits
You'll need to use Exit Script with a result of False in your script to cancel the triggering event. Sorry; should have mentioned that.