MBS FileMaker Plugin Example Databases

Create GIF

All examples are included with download of MBS FileMaker Plugin.

Create GIF.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts3
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Images
5 fields defined, 0 record
Images

Fields

Table Name: Images - 5 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PathNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Global
  • Repetitions: 1
  • Index Language: German
          ImageNormal, BinaryAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
              ImageIDNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                    MBS ImageNormal, BinaryAuto-Enter:
                    • Allow editing
                    Validation:
                    • Only during data entry
                    Storage:
                    • Global
                    • Repetitions: 1
                        SizeNormal, NumberAuto-Enter:
                        • Allow editing
                        Validation:
                        • Only during data entry
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German

                            Layout Objects: Images

                            Regular Fields

                            Field Name: Images::Image
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 85 pt
                            • Left: 138 pt
                            • Bottom: 210 pt
                            • Right: 391 pt
                            • Anchoring: Left, Top
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: System Default
                            • Go to next field using: Tab key
                            No

                            Field Name: Images::MBS Image
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 6 pt
                            • Left: 546 pt
                            • Bottom: 74 pt
                            • Right: 667 pt
                            • Anchoring: Left, Top
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: Default for Data Type
                            • Go to next field using: Tab key
                            No

                            Field Name: Images::Size
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 86 pt
                            • Left: 493 pt
                            • Bottom: 104 pt
                            • Right: 572 pt
                            • Anchoring: Left, Top
                            Field Format:
                            • Edit Box
                            Field Behavior:
                            • Allow field to be entered: In Find mode, In Browse mode
                            • Touch keyboard type: Default for Data Type
                            • Go to next field using: Tab key
                            Yes

                            Buttons

                            Button PropertiesCoordinatesScript/Script Step
                              Type:
                            • Text: Create Images
                            • Top: 11 pt
                            • Left: 408 pt
                            • Bottom: 36 pt
                            • Right: 519 pt
                            • Anchoring: Left, Top
                            Perform Script [ “Create Images” ]

                            Scripts:


                            Button PropertiesCoordinatesScript/Script Step
                              Type:
                            • Text: Make GIF
                            • Top: 45 pt
                            • Left: 408 pt
                            • Bottom: 72 pt
                            • Right: 519 pt
                            • Anchoring: Left, Top
                            Perform Script [ “Create GIF” ]

                            Scripts:


                            Script Hierarchy

                            Create GIF
                            Create Images
                            Clear

                            Next Script: [Create Images]
                            Script NameCreate GIF
                            Run script with full access privilegesOff
                            Include In MenuYes
                            Layouts that use this script
                            Scripts that use this script
                              Script Definition
                              Script Steps
                              • Set Variable [ $folder; Value:MBS( "Folders.UserDesktop" ) ]
                              • Set Variable [ $path; Value:MBS( "Path.AddPathComponent"; $folder; "test.gif" ) ]
                              • Set Variable [ $ImageList; Value:"" ]
                              • #Load images
                              • Go to Record/Request/Page [ First ]
                              • Loop
                              • Set Variable [ $image; Value:MBS("GMImage.NewFromContainer"; Images::Image) ]
                              • Set Variable [ $r; Value:MBS("GMImage.SetGifDisposeMethod"; $image; 1) ]
                              • Set Variable [ $r; Value:MBS("GMImage.SetAnimationDelay"; $image; 10) ]
                              • Set Variable [ $r; Value:MBS("GMImage.SetAnimationIterations"; $image; 3) ]
                              • Set Variable [ $ImageList; Value:$ImageList & ¶ & $Image ]
                              • Set Field [ Images::ImageID; $Image ]
                              • Go to Record/Request/Page [ Next; Exit after last ]
                              • End Loop
                              • #Write TIFF
                              • Set Variable [ $r; Value:MBS("GMImage.WriteImages"; $ImageList; $path; 1) ]
                              • #Free images
                              • Go to Record/Request/Page [ First ]
                              • Loop
                              • Set Variable [ $r; Value:MBS( "GMImage.Destroy"; Images::ImageID ) ]
                              • Set Field [ Images::ImageID; "" ]
                              • Go to Record/Request/Page [ Next; Exit after last ]
                              • End Loop
                              Fields used in this script
                              Scripts used in this script
                                Layouts used in this script
                                  Tables used in this script
                                  Table occurrences used by this script
                                  Custom Functions used by this script
                                    Custom menu set used by this script

                                      Previous Script: [Create GIF]Next Script: [Clear]
                                      Script NameCreate Images
                                      Run script with full access privilegesOff
                                      Include In MenuYes
                                      Layouts that use this script
                                      Scripts that use this script
                                        Script Definition
                                        Script Steps
                                        • Delete All Records [ No dialog ]
                                        • Set Variable [ $size; Value:10 ]
                                        • Loop
                                        • Set Variable [ $image; Value:MBS( "GMImage.New"; "350x350"; "white" ) ]
                                        • Set Variable [ $template; Value:MBS( "GMImage.NewFromContainer"; Images::MBS Image ) ]
                                        • Set Variable [ $r; Value:MBS( "GMImage.SetType"; $image; 6) ]
                                        • Set Variable [ $r; Value:MBS( "GMImage.Scale"; $template; GetAsNumber($size)) ]
                                        • Set Variable [ $r; Value:MBS( "GMImage.CompositeXY"; $image; $template; (350-$size) / 2; (350-$size) / 2; 1) ]
                                        • New Record/Request
                                        • Set Field [ Images::Image; MBS( "GMImage.WriteToPNGContainer"; $image) ]
                                        • Set Field [ Images::Size; $size ]
                                        • Commit Records/Requests [ No dialog ]
                                        • Set Variable [ $r; Value:MBS( "GMImage.Destroy"; $image ) ]
                                        • Set Variable [ $r; Value:MBS( "GMImage.Destroy"; $template ) ]
                                        • #next
                                        • Set Variable [ $size; Value:$size + 10 ]
                                        • Exit Loop If [ $size > 350 ]
                                        • End Loop
                                        • Sort Records [ Keep records in sorted order; Specified Sort Order: Images::Size; ascending ] [ Restore; No dialog ]
                                        Fields used in this script
                                        Scripts used in this script
                                          Layouts used in this script
                                            Tables used in this script
                                            Table occurrences used by this script
                                            Custom Functions used by this script
                                              Custom menu set used by this script

                                                Previous Script: [Create Images]
                                                Script NameClear
                                                Run script with full access privilegesOff
                                                Include In MenuYes
                                                Layouts that use this script
                                                  Scripts that use this script
                                                    Script Definition
                                                    Script Steps
                                                    • Go to Layout [ “Images” ]
                                                    • Delete All Records [ No dialog ]
                                                    Fields used in this script
                                                      Scripts used in this script
                                                        Layouts used in this script
                                                        Tables used in this script
                                                          Table occurrences used by this script
                                                            Custom Functions used by this script
                                                              Custom menu set used by this script

                                                                Download example: Create GIF

                                                                Used functions:




                                                                Links
                                                                MBS Xojo tutorial videos