How to set "appQuitting = true"

How do I set the cancelClose event parameter appQuitting to True.

You cannot. AppQuitting informs you if the window wants to close because it is simply being closed or because of the app shutting down.
(Or, in other words: You do so by calling quit)

AppQuitting is FALSE if you are just closing the associated window
it is True is the window is closing during the App shutdown phase

Thanks. I had alternate window that I would allow a couple of ways to close the app. I had done all sorts of stuff to make sure it would close. I had implemented Quit, but not a test for cancelClose and appquiting. Solved.