4 Replies Latest reply on Oct 9, 2013 12:58 AM by davehob

    Capture window close button pressed

    CarlSchwarz

      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?

       

       

      Thanks.

        • 1. Re: Capture window close button pressed
          CarlSchwarz

          I think I found it, replace the "close" menu item. I'll have to remove the pause from the layout via that method though.

          • 2. Re: Capture window close button pressed
            steveromig

            CarlSchwarz wrote:

             

            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?

             

             

            Thanks.

             

            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.

             

            Steve Romig

            FileMaker, Inc.

            1 of 1 people found this helpful
            • 3. Re: Capture window close button pressed
              CarlSchwarz

              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.


              Thanks.

              • 4. Re: Capture window close button pressed
                davehob

                Carl,

                 

                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.

                 

                Dave.