MBS FileMaker Plugin Example Databases

Export Images

All examples are included with download of MBS FileMaker Plugin.

Export Images.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
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
Export Images
2 fields defined, 1 record
Export Images

Fields

Table Name: Export Images - 2 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
ImageNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      FileNameNormal, TextAuto-Enter: Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German

            Layout Objects: Export Images

            Regular Fields

            Field Name: Export Images::Image
            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
            • Top: 24 pt
            • Left: 138 pt
            • Bottom: 149 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: Export Images::FileName
            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
            • Top: 150 pt
            • Left: 138 pt
            • Bottom: 164 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
            Yes

            Group Buttons

            Button PropertiesCoordinatesScript/Script Step
              Type:
            • Text: Export to Desktop...
              Additional Properties:
            • Change to hand cursor over button
            • Rectangular
            • Top: 24 pt
            • Left: 414 pt
            • Bottom: 49 pt
            • Right: 541 pt
            • Anchoring: Left, Top
            Perform Script [ “run” ]

            Scripts:


            Script Hierarchy

            run

            Script Namerun
            Run script with full access privilegesOff
            Include In MenuYes
            Layouts that use this script
            Scripts that use this script
              Script Definition
              Script Steps
              • #prepare
              • Set Variable [ $img; Value:MBS("GMImage.NewFromContainer"; Export Images::Image) ]
              • Set Variable [ $fpath; Value:Get ( DesktopPath ) ]
              • Set Variable [ $rpath; Value:MBS( "Path.FilemakerPathToNativePath"; $fpath ) ]
              • Set Variable [ $rpath; Value:$rpath & "/test" ]
              • #save as JPEG
              • Set Variable [ $path; Value:$rpath & ".jpg" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "JPEG" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with JPEG"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as PNG
              • Set Variable [ $path; Value:$rpath & ".png" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "PNG" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with PNG"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as TIFF
              • Set Variable [ $path; Value:$rpath & ".tif" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "TIF" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with TIFF"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as PSD
              • Set Variable [ $path; Value:$rpath & ".psd" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "PSD" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with PSD"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as BMP
              • Set Variable [ $path; Value:$rpath & ".bmp" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "BMP" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with BMP"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as PDF
              • Set Variable [ $path; Value:$rpath & ".pdf" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "PDF" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with PDF"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as PICT
              • Set Variable [ $path; Value:$rpath & ".pict" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "PICT" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with PICT"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #save as TGA
              • Set Variable [ $path; Value:$rpath & ".tga" ]
              • Set Variable [ $r; Value:MBS( "GMImage.SetMagick"; $img; "TGA" ) ]
              • Set Variable [ $r; Value:MBS("GMImage.WriteToFile"; $img; $path) ]
              • If [ $r ≠ "OK" ]
              • Show Custom Dialog [ Title: "Error with TGA"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
              • End If
              • #finish
              • Set Variable [ $r; Value:MBS("GMImage.Destroy"; $img) ]
              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: Export Images

                      Used functions:




                      Links
                      MBS Xojo Plugins