I'd like to determine whether an OnLastWindowClose script is running because the last window is closing or because FileMaker Pro is quitting.
It's a similar problem to what's described in this old thread:
In my shutdown script, my user may need an opportunity to exit the script and run a different script before continuing with the shutdown, which starts a timer after which shutdown continues anyway. The "Exit application" script called by OnLastWindowClose then installs a script timer and exits with a status of false to cancel the current close/shutdown.
What I need is a way to capture whether a quit or a close was in progress to start with, so that after the countdown, I can resume whatever process was called in the first place.
I can't use the script parameter technique, because the option isn't available for the OnLastWindowClose trigger.
Is there some other way to tell the difference between closing the last window and quitting the app?