Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Barcode Detection

All examples are included with download of MBS FileMaker Plugin.

Barcode Detection.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 5
Value Lists 0
Custom Functions 0
Custom Menus 33
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Barcode Detection
11 fields defined, 7 records
Barcode Detection

Fields

Table Name: Barcode Detection - 11 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
Description Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
        zxing ExpectedType Normal, Text Auto-Enter:
        • Allow editing
        Validation:
        • Only during data entry
        Storage:
        • Repetitions: 1
        • Indexing: None
        • Automatically create indexes as needed
        • Index Language: German
            zxing ActualType Normal, Text Auto-Enter:
            • Allow editing
            Validation:
            • Only during data entry
            Storage:
            • Repetitions: 1
            • Indexing: None
            • Automatically create indexes as needed
            • Index Language: German
                InputImage Normal, Binary Auto-Enter:
                • Allow editing
                Validation:
                • Only during data entry
                Storage:
                • Repetitions: 1
                    zxing Result Normal, Text Auto-Enter:
                    • Allow editing
                    Validation:
                    • Only during data entry
                    Storage:
                    • Repetitions: 1
                    • Indexing: None
                    • Automatically create indexes as needed
                    • Index Language: German
                        zbar Result Normal, Text Auto-Enter:
                        • Allow editing
                        Validation:
                        • Only during data entry
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German
                            zbar ActualType Normal, Text Auto-Enter:
                            • Allow editing
                            Validation:
                            • Only during data entry
                            Storage:
                            • Repetitions: 1
                            • Indexing: None
                            • Automatically create indexes as needed
                            • Index Language: German
                                zbar Quality Normal, Text Auto-Enter:
                                • Allow editing
                                Validation:
                                • Only during data entry
                                Storage:
                                • Repetitions: 1
                                • Indexing: None
                                • Automatically create indexes as needed
                                • Index Language: German
                                    zbar JSON Normal, Text Auto-Enter:
                                    • Allow editing
                                    Validation:
                                    • Only during data entry
                                    Storage:
                                    • Repetitions: 1
                                    • Indexing: None
                                    • Automatically create indexes as needed
                                    • Index Language: German
                                        zxing JSON Normal, Text Auto-Enter:
                                        • Allow editing
                                        Validation:
                                        • Only during data entry
                                        Storage:
                                        • Repetitions: 1
                                        • Indexing: None
                                        • Automatically create indexes as needed
                                        • Index Language: German
                                            Vision Result Normal, Text Auto-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 Properties Coordinates Field Format Field Behavior Quick 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::InputImage
                                                Field Properties Coordinates Field Format Field Behavior Quick 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::zbar Result
                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                • Top: 258 pt
                                                • Left: 103 pt
                                                • Bottom: 277 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 Quality
                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                • Top: 304 pt
                                                • Left: 103 pt
                                                • Bottom: 323 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 ActualType
                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                • Top: 281 pt
                                                • Left: 103 pt
                                                • Bottom: 300 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 Properties Coordinates Field Format Field Behavior Quick Find
                                                • Top: 235 pt
                                                • Left: 103 pt
                                                • Bottom: 254 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 Properties Coordinates Field Format Field Behavior Quick Find
                                                • Top: 84 pt
                                                • Left: 503 pt
                                                • Bottom: 103 pt
                                                • Right: 756 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 Properties Coordinates Field Format Field Behavior Quick Find
                                                • Top: 107 pt
                                                • Left: 503 pt
                                                • Bottom: 126 pt
                                                • Right: 756 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 Result
                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                • Top: 130 pt
                                                • Left: 503 pt
                                                • Bottom: 149 pt
                                                • Right: 756 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 JSON
                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                • Top: 155 pt
                                                • Left: 503 pt
                                                • Bottom: 174 pt
                                                • Right: 756 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::Vision Result
                                                Field Properties Coordinates Field Format Field Behavior Quick Find
                                                  Hide Condition:
                                                • MBS( "IsLinux" ) or MBS("IsWindows")
                                                • Top: 235 pt
                                                • Left: 503 pt
                                                • Bottom: 323 pt
                                                • Right: 756 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 Properties Coordinates Script/Script Step
                                                  Type:
                                                • Text: zxing Detect
                                                • Top: 46 pt
                                                • Left: 503 pt
                                                • Bottom: 73 pt
                                                • Right: 658 pt
                                                • Anchoring: Left, Top
                                                Perform Script [ “zxing Detect” ]

                                                Scripts:


                                                Button Properties Coordinates Script/Script Step
                                                  Type:
                                                • Text: zbar Detect
                                                • Top: 191 pt
                                                • Left: 152 pt
                                                • Bottom: 218 pt
                                                • Right: 307 pt
                                                • Anchoring: Left, Top
                                                Perform Script [ “zbar Detect” ]

                                                Scripts:


                                                Button Properties Coordinates Script/Script Step
                                                  Type:
                                                • Text: Vision Detect
                                                  Hide Condition:
                                                • MBS( "IsLinux" ) or MBS("IsWindows")
                                                • Top: 191 pt
                                                • Left: 503 pt
                                                • Bottom: 218 pt
                                                • Right: 658 pt
                                                • Anchoring: Left, Top
                                                Perform Script [ “zxing Detect” ]

                                                Scripts:


                                                Graphic Objects

                                                Graphic Object Properties Coordinates
                                                  Type:
                                                • Text: Vision Result
                                                  Hide Condition:
                                                • MBS( "IsLinux" ) or MBS("IsWindows")
                                                • Top: 238 pt
                                                • Left: 416 pt
                                                • Bottom: 253 pt
                                                • Right: 492 pt
                                                • Anchoring: Left, Top

                                                Script Hierarchy

                                                zxing Detect
                                                zbar Detect
                                                Vision Detect
                                                Clear
                                                Load zbar

                                                Next Script: [zbar Detect]
                                                Script Name zxing Detect
                                                Run script with full access privileges Off
                                                Siri Shortcut Visible Off
                                                Include In Menu Yes
                                                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; "" ]
                                                  • Set Field [ Barcode Detection::zxing JSON; "" ]
                                                  • 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) ]
                                                  • Set Field [ Barcode Detection::zxing JSON; MBS("JSON.Colorize"; MBS("Barcode.DetectAsJSON"; Barcode Detection::InputImage; Barcode Detection::zxing ExpectedType)) ]
                                                  • 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: [Vision Detect]
                                                          Script Name zbar Detect
                                                          Run script with full access privileges Off
                                                          Siri Shortcut Visible Off
                                                          Include In Menu Yes
                                                          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: [Clear]
                                                                  Script Name Vision Detect
                                                                  Run script with full access privileges Off
                                                                  Siri Shortcut Visible Off
                                                                  Include In Menu Yes
                                                                  Layouts that use this script
                                                                    Scripts that use this script
                                                                      Script Definition
                                                                      Script Steps
                                                                      • Set Field [ Barcode Detection::Vision Result; "" ]
                                                                      • If [ MBS("IsWindows") ]
                                                                      • Show Custom Dialog [ Message: "Vision is only or macOS and iOS."; Default Button: “OK”, Commit: “Yes” ]
                                                                      • Exit Script [ ]
                                                                      • 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("Vision.DetectBarcode"; Barcode Detection::InputImage; "") ]
                                                                      • If [ MBS("IsError") ]
                                                                      • Set Field [ Barcode Detection::Vision Result; $r ]
                                                                      • Else [ ]
                                                                      • Set Field [ Barcode Detection::Vision Result; MBS("JSON.Colorize"; $r) ]
                                                                      • 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: [Vision Detect] Next Script: [Load zbar]
                                                                              Script Name Clear
                                                                              Run script with full access privileges Off
                                                                              Siri Shortcut Visible Off
                                                                              Include In Menu Yes
                                                                              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 ]
                                                                                  • Replace Field Contents [ Barcode Detection::zxing JSON; Replace with calculation: "" ] [ No dialog ]
                                                                                  • Replace Field Contents [ Barcode Detection::Vision Result; 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 Name Load zbar
                                                                                          Run script with full access privileges Off
                                                                                          Siri Shortcut Visible Off
                                                                                          Include In Menu Yes
                                                                                          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: