3 Replies Latest reply on Jan 5, 2017 5:51 PM by taylorsharpe

    Scripts that change layout settings

    bpconners

      I have created many FMP applications over the years, I would like to establish a common look and feel for them.

      I can copy and paste layouts and import and export themes which does most of this, but there are a few issues.

       

      When I create a new layout to paste a similar layout from another solution, the part sizes are the wrong size so I have to adjust them.

      Is there any way to do one of the following:

       

      (Ideal solution)

      1: write a script that will set the attributes of a layout i.e.

      set Header height to 90pt

      set Body height to 36

      set field(fieldname)width to 80pt

      etc.

       

      (workaround solution)

      2:change the default size of the header body and footer on new layouts so they are ready to "accept" the paste gracefully.

        • 1. Re: Scripts that change layout settings
          ch0c0halic

          In both cases the answer is No.

           

          Suggestion, make a "Default" layout with the settings you want to use. When you need a new one then duplicate the default layout.

           

          This "Default" layout could include common design elements, for example a header of navigation buttons, and set to a custom Theme used in the solution. Hiding stuff by placing them stage right off the visible part of the layout allows you to easily access the required objects for the specific layout.

          1 of 1 people found this helpful
          • 2. Re: Scripts that change layout settings
            bpconners

            Yes I've been doing that,

            in each solution I create a new layout set the header, body, and footer,

            Import the Theme

            Copy the layout from the "Master" solution

            manually change each field to show a similar field from the corresponding Table in this solution.

            I've done this to about 8 solutions with 10-50 layouts, I have another 50 solutions and 700 layouts to go.

            This should be scriptable. I write software in many languages including Java Python C# ... If I just had access I could do this myself.

            I realize it's probably locked down because people could really destroy things with that kind of power, but I think a few limited features (at least let me define some default parameters for new layouts)

             

            Thanks for answering though.

            • 3. Re: Scripts that change layout settings
              taylorsharpe

              As stated above, no you can't do this with scripting.  But it sure would be nice to dream about if we could write a script that could create schema, layouts, security, etc., so that in effect you can run a script that would create a solution for someone.  It is a little bit like running scripts that create all of the SQL tables and fields for a database which I commonly see in MySQL, but only more powerful in that it could also create the UI.  Obviously the Layouts are a bunch of CSS that is hidden from us, but could be manipulated with a script.  The reality is that it probably would make FileMaker much more complicated than the target audience of users.  Still, it is fun to dream.  If FM could do it and make it simple!