MBS FileMaker Plugin Example Databases

Barcode Detection

All examples are included with download of MBS FileMaker Plugin.

Barcode Detection.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
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
Barcode Detection
9 fields defined, 7 records
Barcode Detection

Fields

Table Name: Barcode Detection - 9 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
DescriptionNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
        zxing ExpectedTypeNormal, TextAuto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German
            zxing ActualTypeNormal, TextAuto-Enter:
            • Allow editing
            Validation:
            • Only during data entry
            Storage:
            • Repetitions: 1
            • Indexing: None
            • Automatically create indexes as needed
            • Index Language: German
                InputImageNormal, BinaryAuto-Enter:
                • Allow editing
                Validation:
                • Only during data entry
                Storage:
                • Repetitions: 1
                    zxing ResultNormal, TextAuto-Enter:
                    • Allow editing
                    Validation:
                    • Only during data entry
                    Storage:
                    • Repetitions: 1
                    • Indexing: None
                    • Automatically create indexes as needed
                    • Index Language: German
                        zbar ResultNormal, TextAuto-Enter:
                        • Allow editing
                        Validation:
                        • Only during data entry
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German
                            zbar ActualTypeNormal, TextAuto-Enter:
                            • Allow editing
                            Validation:
                            • Only during data entry
                            Storage:
                            • Repetitions: 1
                            • Indexing: None
                            • Automatically create indexes as needed
                            • Index Language: German
                                zbar QualityNormal, TextAuto-Enter:
                                • Allow editing
                                Validation:
                                • Only during data entry
                                Storage:
                                • Repetitions: 1
                                • Indexing: None
                                • Automatically create indexes as needed
                                • Index Language: German
                                    zbar JSONNormal, TextAuto-Enter:
                                    • Allow editing
                                    Validation:
                                    • Only during data entry
                                    Storage:
                                    • Repetitions: 1
                                    • Indexing: None
                                    • Automatically create indexes as needed
                                    • Index Language: German

                                        Layout Objects: Barcode Detection

                                        Regular Fields

                                        Field Name: Barcode Detection::Description
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 27 pt
                                        • Left: 103 pt
                                        • Bottom: 46 pt
                                        • Right: 356 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

                                        Field Name: Barcode Detection::zxing ExpectedType
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 28 pt
                                        • Left: 499 pt
                                        • Bottom: 47 pt
                                        • Right: 752 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

                                        Field Name: Barcode Detection::InputImage
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 49 pt
                                        • Left: 103 pt
                                        • Bottom: 174 pt
                                        • Right: 356 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: Barcode Detection::zxing Result
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 179 pt
                                        • Left: 103 pt
                                        • Bottom: 198 pt
                                        • Right: 356 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

                                        Field Name: Barcode Detection::zbar Result
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 179 pt
                                        • Left: 499 pt
                                        • Bottom: 198 pt
                                        • Right: 752 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

                                        Field Name: Barcode Detection::zbar Quality
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 225 pt
                                        • Left: 499 pt
                                        • Bottom: 244 pt
                                        • Right: 752 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

                                        Field Name: Barcode Detection::zbar ActualType
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 202 pt
                                        • Left: 499 pt
                                        • Bottom: 221 pt
                                        • Right: 752 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

                                        Field Name: Barcode Detection::zxing ActualType
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 206 pt
                                        • Left: 103 pt
                                        • Bottom: 225 pt
                                        • Right: 356 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

                                        Field Name: Barcode Detection::zbar JSON
                                        Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                        • Top: 156 pt
                                        • Left: 499 pt
                                        • Bottom: 175 pt
                                        • Right: 752 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: zxing Detect
                                        • Top: 68 pt
                                        • Left: 499 pt
                                        • Bottom: 95 pt
                                        • Right: 654 pt
                                        • Anchoring: Left, Top
                                        Perform Script [ “zxing Detect” ]

                                        Scripts:


                                        Button PropertiesCoordinatesScript/Script Step
                                          Type:
                                        • Text: zbar Detect
                                        • Top: 111 pt
                                        • Left: 499 pt
                                        • Bottom: 138 pt
                                        • Right: 654 pt
                                        • Anchoring: Left, Top
                                        Perform Script [ “zbar Detect” ]

                                        Scripts:


                                        Script Hierarchy

                                        zxing Detect
                                        zbar Detect
                                        Clear
                                        Load zbar

                                        Next Script: [zbar Detect]
                                        Script Namezxing Detect
                                        Run script with full access privilegesOff
                                        Include In MenuYes
                                        Layouts that use this script
                                        Scripts that use this script
                                          Script Definition
                                          Script Steps
                                          • Set Field [ Barcode Detection::zxing ActualType; "" ]
                                          • Set Field [ Barcode Detection::zxing Result; "" ]
                                          • If [ IsEmpty(Barcode Detection::InputImage) ]
                                          • Show Custom Dialog [ Message: "Image Missing!"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                          • Exit Script [ ]
                                          • End If
                                          • Set Variable [ $r; Value:MBS("Barcode.Detect"; Barcode Detection::InputImage; Barcode Detection::zxing ExpectedType; 1) ]
                                          • If [ MBS("IsError") ]
                                          • Set Field [ Barcode Detection::zxing Result; $r ]
                                          • Else
                                          • Set Variable [ $pos; Value:Position ( $r ; ": "; 1; 1 ) ]
                                          • Set Field [ Barcode Detection::zxing Result; Middle($r; $pos+2; Length($r)) ]
                                          • Set Field [ Barcode Detection::zxing ActualType; Left($r; $pos-1) ]
                                          • End If
                                          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: [zxing Detect]Next Script: [Clear]
                                                  Script Namezbar Detect
                                                  Run script with full access privilegesOff
                                                  Include In MenuYes
                                                  Layouts that use this script
                                                  Scripts that use this script
                                                    Script Definition
                                                    Script Steps
                                                    • Set Field [ Barcode Detection::zbar ActualType; "" ]
                                                    • Set Field [ Barcode Detection::zbar Result; "" ]
                                                    • #load if needed
                                                    • If [ MBS("Barcode.Loaded") ≠ 1 ]
                                                    • Perform Script [ “Load zbar” ]
                                                    • End If
                                                    • If [ IsEmpty(Barcode Detection::InputImage) ]
                                                    • Show Custom Dialog [ Message: "Image Missing!"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                    • Exit Script [ ]
                                                    • End If
                                                    • Set Variable [ $r; Value:MBS("Barcode.Scan"; Barcode Detection::InputImage) ]
                                                    • If [ MBS("IsError") ]
                                                    • Set Field [ Barcode Detection::zbar Result; $r ]
                                                    • Else
                                                    • Set Field [ Barcode Detection::zbar JSON; $r ]
                                                    • Set Field [ Barcode Detection::zbar Result; JSONGetElement ( $r ; "[0]text" ) ]
                                                    • Set Field [ Barcode Detection::zbar ActualType; JSONGetElement ( $r ; "[0]name" ) ]
                                                    • Set Field [ Barcode Detection::zbar Quality; JSONGetElement ( $r ; "[0]quality" ) ]
                                                    • End If
                                                    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: [zbar Detect]Next Script: [Load zbar]
                                                          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
                                                              • Replace Field Contents [ Barcode Detection::zxing ActualType; Replace with calculation: "" ] [ No dialog ]
                                                              • Replace Field Contents [ Barcode Detection::zxing Result; Replace with calculation: "" ] [ No dialog ]
                                                              • Replace Field Contents [ Barcode Detection::zbar Result; Replace with calculation: "" ] [ No dialog ]
                                                              • Replace Field Contents [ Barcode Detection::zbar ActualType; Replace with calculation: "" ] [ No dialog ]
                                                              • Replace Field Contents [ Barcode Detection::zbar Quality; Replace with calculation: "" ] [ No dialog ]
                                                              • Replace Field Contents [ Barcode Detection::zbar JSON; Replace with calculation: "" ] [ 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: [Clear]
                                                                      Script NameLoad zbar
                                                                      Run script with full access privilegesOff
                                                                      Include In MenuYes
                                                                      Layouts that use this script
                                                                        Scripts that use this script
                                                                        Script Definition
                                                                        Script Steps
                                                                        • // Show Custom Dialog [ Title: "Please change path to library."; Message: "You need to download zbar library for macOS, Windows or Linux and put path in script."; Default Button: “OK”, Commit: “Yes” ]
                                                                        • // Exit Script [ ]
                                                                        • If [ MBS("IsWindows") ]
                                                                        • #you may need to download zbar from our Libs folder or get your own
                                                                        • #our copy of the library has a dependency, so we load libiconv first
                                                                        • Set Variable [ $path; Value:"C:\Users\Christian\Desktop\libiconv.dll" ]
                                                                        • Set Variable [ $r; Value:MBS( "Process.LoadLibrary"; $Path ) ]
                                                                        • #now we can load zbar dll
                                                                        • Set Variable [ $path; Value:"C:\Users\Christian\Desktop\libzbar64-0.dll" ]
                                                                        • Else If [ MBS("isMacOS") ]
                                                                        • #you may need to download zbar from our Libs folder or get your own
                                                                        • Set Variable [ $path; Value:"/Users/cs/Desktop/libzbar.0.dylib" ]
                                                                        • Else If [ MBS("isLinux") ]
                                                                        • #you may need to install first: sudo apt-get install libzbar0
                                                                        • Set Variable [ $path; Value:"/usr/lib/x86_64-linux-gnu/libzbar.so.0" ]
                                                                        • Else
                                                                        • Show Custom Dialog [ Title: "Unsupported platform"; Message: "No library coded for this platform or no MBS Plugin installed."; Default Button: “OK”, Commit: “Yes” ]
                                                                        • Halt Script
                                                                        • End If
                                                                        • #load zbar
                                                                        • Set Variable [ $r; Value:MBS("Barcode.LoadLibrary"; $path) ]
                                                                        • If [ MBS("IsError") ]
                                                                        • Show Custom Dialog [ Title: "Failed to load library"; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                        • End If
                                                                        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: Barcode Detection

                                                                                      Used functions:




                                                                                      Links
                                                                                      MBS Xojo PDF Plugins

                                                                                      Start Chat