3 Replies Latest reply on Sep 19, 2012 11:06 AM by hsutton47

    New Window problem

    BryanHolman

      Title

      New Window problem

      Post

      Yesterday I had just about finished my project, I was very happy with everything and today when I opened it to start, it was behaving different. 

      When you push one button, the script I am using is: 

        Show Custom Dialog ["Checkinventory"; "Have you checked to see if the item already exists?"]

        If [Get(LastMessageChoice) = 2]

             New Window [Name: "AddItem"; Height: 750; Width: 410; Top: 150; Left: 150]

             Go to Layout ["AddItem" (My CFI)]

        End If

       

      My problem is that when I run this script, it opens a new window, but gets rid of the window I am currently working in.  When I exit the Add an Item window, it returns back to the original window with the new size.

      What I need it to do is become more of a popup that disappears after I input the information that needs to be put in.

       

       

       

        • 1. Re: New Window problem
          philmodjunk

          I predict that you are using this on a windows platform, not a Mac as Mac's do not have this annoying issue. I further predict that your windows were maximized when you ran this script. With maximized windows, opening a new window automatically resizes the original window to a previously used set of window dimensions which can minimize and/or move your window to the point were it is no longer visible.

          If I am right, you have two options:

          1) Don't maximize your windows. I don't like this approach myself as I don't like the window inside a window mess you get, but your windows will open and close without the original window changing size or location on you.

          2) Add a move resize window step to your script after the new window command that resizes the original window back to a size you want. I use get functions to resize the original window out as close to the original maximized size as I can. This results in a "twitch" to the original window I'd prefer to do without, but it keeps it visible and minimizes the size/position change of the original window. Note that after closing this new window, you need to run a script that returns your windows to their maximized state. I use a custom menu for this so that clicking the close window control in the corner of the window, using the keyboard short cut or selecting the option from the file menu run a script that closes the window and then maximizes the remaining windows. Any buttons that close this window also perform this same script.

          • 2. Re: New Window problem
            BryanHolman

            Thanks, that seems to be the problem.  Seems to be a lot of bugs that are windows only problems.  Oh well.

            • 3. Re: New Window problem
              hsutton47

                   Hi PhilMod, I see what you're talking about.  Yes, you are correct in that I am on the Windows (7 Professional) platform thus I am cursed.  And I am on FM 10 Pro Advanced as well by the way.

                   To use the get function as you suggested, do I just create a text field with that function and look at the results by adding that field to a record in the window with it maximized or as large as possible?

                   For now, I plugged in larger window width and height for the master window in the script just to see what would happen and sure enough the original master window is now playing peek-a-boo sticking out on both sides of the smaller pop-up window.

                   I had already done what you suggested at the end of your post.  I placed a "Close" button on the pop-up that kicks off a script to close that window, re-call the original window and re-adjust to max display mode.

                   Too bad Windows users are stuck with this issue.  Thanks for your help.