6 Replies Latest reply on Apr 11, 2013 11:12 AM by philmodjunk

    Close Window on exit?

    RealNameArcher

      Title

      Close Window on exit?

      Post

           I have two questions and I'm sure there is an easy script for this but I can't seem to figure it out.

           1.) I would like to be able to close a popup window when I click on any other window. My goal is to have as few windows open at the same time, prevent clutter.

           2.) Also if I have a pop up window open and return to the main screen without closeing it and click the same script that opens the popup it opens the same window again. I would like it to go to the currently open window instead of opening a new window.

        • 1. Re: Close Window on exit?
          Jade

               1.) Can you use a modal  Window for your pop-up?  Users cannot activate an open document window before closing an open dialog (modal) window.

               2.)  Insert the following into your script that opens the pop-up:

               Select Window [ Name: "Your_Pop_Up_Window_Name" ]

               If [ Get( WindowName ) ≠ "Your_Pop_Up_Window_Name" ]

                     New Window [ Name: "Your_Pop_Up_Window_Name" ; …]

               End If

                

                

          • 2. Re: Close Window on exit?
            RealNameArcher

                 Thanks Jade, That answers my second question. Any suggestions on my first question? Some of my windows I would like to close when I leave that window.

                 Also.. while I have a pro on the line. I have popup windows that I use for quick editing of a record in another window. It's basically a 300px wide data entry window that scrolls. When I'm on that pop up window and I choose to cycle through records, I'd like the main window to cycle through records as well so that the two windows mirror each other. I could use a script like that in a few differet types of situations. Sorry if my explanation is confusing.

                 Thanks


                 W

            • 3. Re: Close Window on exit?
              RealNameArcher

                   Sorry after reviewing I see that your suggestion for my first was to use a "Modal window" I'm not familiar.

              • 4. Re: Close Window on exit?
                Jade

                     Which version of FMP do you have?  In v12, you can use the advanced options to specify a "dialog" window for your pop-ups.  Users cannot activate an open document window before closing an open dialog window.  (Note: this is not the same window style as a custom dialog box.)

                     i"m not a "pro" by any means so I'll defer your supplemental question to others.  You may get a faster reply if you post this in a new thread.

                • 5. Re: Close Window on exit?
                  Jade

                       When you define the options in the New Window [] scriptstep in v12, you can also specify advanced styles (at the bottom of the dialog box).  Click the "Specify" button and choose "Dialog Window (Modal)" style.

                  • 6. Re: Close Window on exit?
                    philmodjunk

                         IF you are using an older version, there are ways to make a window "modal" with a paused script where closing the window resumes or halts the paused script.