2 Replies Latest reply on Apr 14, 2012 1:17 AM by GaryTate

    Solution wide theme update

    GaryTate

      Is it possible to change themse across a complete solution in one easy step and have I wasted my time writing a script to do it for me (it's a nice script though :-)

       

      Gary

        • 1. Re: Solution wide theme update
          Stephen Huston

          No, your script was worth the effort if it works. There is no built-in solution-wide theme changing option.

           

          One trick we just learned from the FM engineers is that the last layout you are on in layout mode will act as a Theme-template if you create a new layout from there. You don't need to duplicate it or anything. If you are in a layout with the River Touch theme applied, creating a new layout will set the new one to River Touch be default.

           

          However, any object level reformatting that's not part of the base theme will not be used in the new layout, just the base theme.

          • 2. Re: Solution wide theme update
            GaryTate

            Here you go then guys, if anyone is interested this is the AppleScript that will set the theme for all layouts within a range. It will only run on a Mac (obviously) and you need to make sure you have the relevant database open and in layout mode before you run it.... and there's no error trapping in there either ;-)

             

            Remember, if anyone out there wants any help with scripting or automation get in touch with us ;-)

             

            Gary

             

             

            set TheFirst to 1 --enter the layout number f the first layout you wish to set

            set TheLast to 10 --enter the layout number of the last layout you wish to set

            set TheTheme to "green" --enter the name of the them you wish to use

             

            repeat with CurrentLayout from TheFirst to TheLast

               

                activate application "FileMaker Pro Advanced"

                tell application "FileMaker Pro Advanced"

                    tell window 1

                        set current layout to layout CurrentLayout

                    end tell

                end tell

                tell application "System Events"

                    tell process "FileMaker Pro Advanced"

                        click menu item "Change Theme..." of menu 1 of menu bar item "Layouts" of menu bar 1

                        keystroke TheTheme

                        keystroke return

                    end tell

                end tell

               

            end repeat