I use an On Layout Exit trigger on a layout. As per FileMaker documentation, the script runs not just when changing layouts (which I want) but also when the window is being closed. Given what the script does, that is pointless and causes an unnecessary delay in closing the window. I would like to avoid that.
So I would like to put into my trigger script something like:
If [Window is being closed]
Is there a way to detect whether the window is being closed, as opposed to changing the layout?