6 Replies Latest reply on Aug 8, 2015 12:37 AM by Markus Schneider

    WindowName using Move/Resize Function Challenge

    sumaschu

      Hi all,

       

      Have a question regarding the use of the Move/Resize Windo function when it comes to the WindowName.  Here's the situation:

       

      Using scripts to produce a series of related reports and print them.  At a certain point, since Show Custom Dialog doesn't allow for dropdown menus, am using a small sized layout to emulate a Custom Dialog.  So far, so good.  Am aware that when one brings in a New Window, it resizes the previous layout since I am using a Windows based PC.  Have seen many resourceful folks talk about using the Move/Resize function to alter the way the screen looks, which I appreciate.  However, can't seem to find anything addressing how to select the proper Window to resize.  So, how does one get the proper name of the Layout that has been resized?

       

      For example, let's say we have a FMPa v13 file called "Sample_FMP_DB.fmp12".  Let's further assume the original Layout is called "Master Layout" and the new dialog-ish Layout is called "Small Layout".  The script starts when a button is clicked on the "Master Layout" screen, and invokes the New Window function bringing up the "Small Layout".  This of course resizes the "Master Layout" screen.  When using the Move/Resize Window function, what do I put in for the Window Name to bring back the full sized "Master Layout" screen?

       

      Move-Resize Window Image.jpg

      From our example names from the previous paragraph, have tried "Sample_FMP_DB.fmp12", "Master Layout", and as you can see "Get (WindowName)" to no avail. 


      As you can see from the above screen print, the "Master Layout" (ie. Maintenance Layout) has shrunk to less than maximum.  What am I doing wrong?  This is driving me nuts.  Would appreciate any helpful direction!

       

      Thanks!

      Mark <><

        • 1. Re: WindowName using Move/Resize Function Challenge
          erolst

          sumaschu wrote:

          For example, let's say we have a FMPa v13 file called "Sample_FMP_DB.fmp12".  Let's further assume the original Layout is called "Master Layout" and the new dialog-ish Layout is called "Small Layout".  The script starts when a button is clicked on the "Master Layout" screen, and invokes the New Window function bringing up the "Small Layout".  This of course resizes the "Master Layout" screen.  When using the Move/Resize Window function, what do I put in for the Window Name to bring back the full sized "Master Layout" screen?

          It doesn't really matter what any layout is called (or the file, for that matter); it's the window name that counts.

           

          If you use Get ( WindowName ), do it before you open the “dialog” window, then use its result, as in:

           

          Set Variable [ $windowToResize ; Get ( WindowName ) ]

          New Window [ dialogWindow ]

          Move/Resize Window [ Window to resize: $windowToResize ; … ]

          • 2. Re: WindowName using Move/Resize Function Challenge
            okramis

            In my oppinion it's best to keep control over the window names and default size. In my start-script I usually do this:

             

            Set Window Title [ Current Window; New Title: "1" ] //this renames the initial window on open

            do some stuff here for example hide statusbar.....

            New Window [ Name: "myIntendedWindowName"; Height: If ( GUI::Platform = 1 ; 912 ; 934 ); Width: If ( GUI::Platform = 1 ; 1401 ; 1422 ); Top: 1; Left: 1; Style: Document; Close: “No”; Minimize: “No”; Maximize: “No”; Zoom Control Area: “No”; Resize: “Yes” ]  //I lock down the minimize/maximize/close-buttons and implement my own....

            Close Window [ Name: "1"; Current file ] //close the initial window


            now I know the window name and I lock down the "New Window" menu-command, so I can control new windows and it's names...

             

            Best regards

            Otmar


             

            • 3. Re: WindowName using Move/Resize Function Challenge
              rrrichie

              I use similar setups.  I just do for example :

               

              Open New Window name : DialogX  (I set the dimensions with calculation)

              Enter Find Mode (to avoid script triggers)

              Goto Dialog Layout

              Enter Browse Mode

              (if needed a resize could be done)

              Close Window name DialogX.

              FileMaker names the first window it opens the same as the database name.  But any new windows you can name anything you want.

              • 4. Re: WindowName using Move/Resize Function Challenge
                user19752

                How about using popup button instead of new window?

                • 5. Re: WindowName using Move/Resize Function Challenge
                  sumaschu

                  Thanks for all the great suggestions!  Appreciate it.

                   

                  Thanks again,

                  Mark <><

                  • 6. Re: WindowName using Move/Resize Function Challenge
                    Markus Schneider

                    if You have the second window as an 'utility' (no need to deactivate all the options) window, You can just close it after action was taken - the original window will be on top again.

                    As mentioned in other answers, You can get the 'master window name' before creating a new window an You got the name for going back.

                    I usually do an 'activate window (desired_name)' before the 'new window(desired_name)'. If the last error is  (window exists), I close that window - helps to keep the screen clean..