I think I found it, replace the "close" menu item. I'll have to remove the pause from the layout via that method though.
1 of 1 people found this helpful
I have some floating windows and I use the "Pause" script step on that layout to keep it in focus and to allow the window to quit when the enter button is pressed. I perform some operations when the window is closed.
I would like to close the window if someone clicks on the "X" button, how to I capture that the "X" button has been pressed?
If you are using FileMaker Pro 12, you can likely also use the OnWindowClose script trigger to achieve the same thing - altough using Custom Menus like it sounds like you did is also a viable option. Just something (else) to think about.
Do you mean "OnLayoutExit"? I can't find an OnWindowClose script trigger in Layout Setup.
OnWindowClose certainly would be more ideal because I don't have a "file" entry in the custom menu and I'd rather avoid putting it there.
OnWindowClose is a file level trigger, so it's under File Options, not Layout Setup. It applies to all window closures - test for the window name or other attribute within the script to apply different behaviours to different windows.