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

MBS FileMaker Plugin Example Databases

Pick color from image via Screenshot

All examples are included with download of MBS FileMaker Plugin.

Pick color from image via Screenshot.fmp12

Overview
Tables 1
Relationships 1
Layouts 1
Scripts 3
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Minimalistisch
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password Off
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
Comments
Occurrences in Relationship Graph
Image
8 fields defined, 1 record
Image

Fields

Table Name: Image - 8 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
Image Normal, Binary Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      Mouse X Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Mouse Y Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              Original Image Normal, Binary Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
                      ImageID Normal, Number Auto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: All
                      • Index Language: German
                        farbe Normal, Text Auto-Enter:
                        • Allow editing
                        Validation:
                        • Only during data entry
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German
                            Farbfeld Big Calculated, Text Calculation:
                            • Context table: Image
                            • Let ([ x = Substitute ( Image::farbe ; " "; ¶) ; R = GetValue( x ; 2 ) / 257 ; G = GetValue( x ; 3 ) / 257 ; B = GetValue( x ; 4 ) / 257 ]; TextStyleAdd ( TextSize ( TextColor ( "█" ; RGB ( R ; G ; B ) ) ; 100 ) ; Bold + Condense ) )
                            Auto-Enter:
                            • Always evaluate
                            Storage:
                            • Repetitions: 1
                            • Do not store calculation results
                            • Index Language: German
                                  Screenshot Normal, Binary Auto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1

                                      Layout Objects: Image

                                      Regular Fields

                                      Field Name: Image::Image
                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                      • Top: 61 pt
                                      • Left: 147 pt
                                      • Bottom: 559 pt
                                      • Right: 805 pt
                                      • Anchoring: Left and Right, Top and Bottom
                                      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: Image::Mouse X
                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                      • Top: 151 pt
                                      • Left: 64 pt
                                      • Bottom: 172 pt
                                      • Right: 143 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: Image::Mouse Y
                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                      • Top: 174 pt
                                      • Left: 64 pt
                                      • Bottom: 195 pt
                                      • Right: 143 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: Image::ImageID
                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                      • Top: 90 pt
                                      • Left: 59 pt
                                      • Bottom: 111 pt
                                      • Right: 138 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: Image::farbe
                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                      • Top: 241 pt
                                      • Left: 5 pt
                                      • Bottom: 323 pt
                                      • Right: 138 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: Image::Farbfeld Big
                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                      • Top: 369 pt
                                      • Left: 5 pt
                                      • Bottom: 451 pt
                                      • Right: 138 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: Image::Screenshot
                                      Field Properties Coordinates Field Format Field Behavior Quick Find
                                      • Top: 485 pt
                                      • Left: 5 pt
                                      • Bottom: 559 pt
                                      • Right: 138 pt
                                      • Anchoring: Left, Bottom
                                      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

                                      Group Buttons

                                      Button Properties Coordinates Script/Script Step
                                        Object Name:
                                      • Image
                                      • Top: 61 pt
                                      • Left: 147 pt
                                      • Bottom: 559 pt
                                      • Right: 805 pt
                                      • Anchoring: Left and Right, Top and Bottom
                                      Perform Script [ “Click” ]

                                      Scripts:


                                      Buttons

                                      Button Properties Coordinates Script/Script Step
                                        Type:
                                      • Text: Import Picture
                                      • Top: 10 pt
                                      • Left: 693 pt
                                      • Bottom: 42 pt
                                      • Right: 805 pt
                                      • Anchoring: Right, Top
                                      Perform Script [ “Import Picture” ]

                                      Scripts:


                                      Script Hierarchy

                                      Click
                                      Clear
                                      Import Picture

                                      Next Script: [Clear]
                                      Script Name Click
                                      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
                                        • #short pause to let FileMaker redraw without gray overlay
                                        • Pause/Resume Script [ Duration (seconds): ,1 ]
                                        • #mouse position
                                        • Set Variable [ $x; Value:MBS("RemoteControl.MouseX") ]
                                        • Set Variable [ $y; Value:MBS("RemoteControl.MouseY") ]
                                        • Set Field [ Image::Mouse X; $x ]
                                        • Set Field [ Image::Mouse Y; $y ]
                                        • #take screenshot of area
                                        • Set Variable [ $screenshot; Value:MBS( "ScreenshotRect"; $x-8; $y-8; 17; 17; "JPEG"; 1024) ]
                                        • Set Field [ Image::Screenshot; $screenshot ]
                                        • #now pick color in middle
                                        • Set Variable [ $image; Value:MBS("GMImage.NewFromContainer"; $screenshot ) ]
                                        • Set Variable [ $color; Value:MBS("GMImage.GetPixelColor"; $Image; 8; 8) ]
                                        • Set Variable [ $error; Value:MBS("GMImage.Release";$Image) ]
                                        • Set Field [ Image::farbe; $color ]
                                        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: [Click] Next Script: [Import Picture]
                                                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
                                                    • Set Field [ Image::Image; "" ]
                                                    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 Import Picture
                                                            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
                                                              • Go to Field [ Image::Image ]
                                                              • Insert Picture [ ]
                                                              • Go to Field [ Image::ImageID ]
                                                              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: Pick color from image via Screenshot

                                                                      Used functions: