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

MBS FileMaker Plugin Example Databases

HotKeys

All examples are included with download of MBS FileMaker Plugin.

HotKeys.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 7
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
HotKeys
4 fields defined, 2 records
HotKeys

Fields

Table Name: HotKeys - 4 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
Code Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      Modifiers Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Comment Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
                HotKey ID 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: HotKeys

                    Regular Fields

                    Field Name: HotKeys::Code
                    Field Properties Coordinates Field Format Field Behavior Quick Find
                    • Top: 107 pt
                    • Left: 79 pt
                    • Bottom: 126 pt
                    • Right: 332 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: HotKeys::Modifiers
                    Field Properties Coordinates Field Format Field Behavior Quick Find
                    • Top: 130 pt
                    • Left: 79 pt
                    • Bottom: 149 pt
                    • Right: 332 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: HotKeys::Comment
                    Field Properties Coordinates Field Format Field Behavior Quick Find
                    • Top: 153 pt
                    • Left: 79 pt
                    • Bottom: 172 pt
                    • Right: 332 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: HotKeys::HotKey ID
                    Field Properties Coordinates Field Format Field Behavior Quick Find
                    • Top: 176 pt
                    • Left: 79 pt
                    • Bottom: 195 pt
                    • Right: 332 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: Register Hotkey
                    • Top: 107 pt
                    • Left: 351 pt
                    • Bottom: 138 pt
                    • Right: 499 pt
                    • Anchoring: Left, Top
                    Perform Script [ “Register” ]

                    Scripts:


                    Button Properties Coordinates Script/Script Step
                      Type:
                    • Text: Unregister Hotkey
                    • Top: 149 pt
                    • Left: 351 pt
                    • Bottom: 180 pt
                    • Right: 499 pt
                    • Anchoring: Left, Top
                    Perform Script [ “Unregister” ]

                    Scripts:


                    Script Hierarchy

                    HotKeyAction
                    Register
                    Unregister
                    Unregister all
                    Trace
                    -
                    Register hotkey to get field name

                    Next Script: [Register]
                    Script Name HotKeyAction
                    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 [ Message: "Hotkey pressed with ID: " & Get(ScriptParameter); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                        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: [HotKeyAction] Next Script: [Unregister]
                                      Script Name Register
                                      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 [ HotKeys::HotKey ID; MBS("Hotkey.Register"; HotKeys::Code; HotKeys::Modifiers) ]
                                        • Set Variable [ $r; Value:MBS("HotKey.SetScript"; HotKeys::HotKey ID; Get(FileName); "HotkeyAction") ]
                                        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: [Register] Next Script: [Unregister all]
                                                Script Name Unregister
                                                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 Variable [ $r; Value:MBS("Hotkey.Unregister"; HotKeys::HotKey ID) ]
                                                  • Set Field [ HotKeys::HotKey ID; "" ]
                                                  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: [Unregister] Next Script: [Trace]
                                                          Script Name Unregister all
                                                          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 Variable [ $r; Value:MBS("Hotkey.UnregisterAll") ]
                                                              • Replace Field Contents [ HotKeys::HotKey ID; 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: [Unregister all] Next Script: [-]
                                                                      Script Name Trace
                                                                      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 Variable [ $r; Value:MBS("Trace") ]
                                                                          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: [Trace] Next Script: [Register hotkey to get field name]
                                                                                        Script Name -
                                                                                        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
                                                                                              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: [-]
                                                                                                            Script Name Register hotkey to get field name
                                                                                                            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
                                                                                                                • #registers a hotkey option-control-command-c to copy the names of fields referenced by selected layout objects in the layout editor
                                                                                                                • Set Variable [ $Hotkey; Value:MBS("Hotkey.Register"; "C"; "option control command") ]
                                                                                                                • #set calculation to run
                                                                                                                • Set Variable [ $r; Value:MBS("HotKey.SetEvaluate"; $Hotkey; "Let([ copy = MBS( \"Menubar.RunMenuCommand\"; 57634 ); xml = MBS( \"Clipboard.GetFileMakerData\"; \"Auto\" ); name = MBS(\"XML.Query\"; xml; \"/fmxmlsnippet/Layout/Object/FieldObj/Name\"; \"\"; 2); r = MBS( \"Clipboard.SetText\"; name ) ]; name)") ]
                                                                                                                • #make it permanent and go to the preferences file
                                                                                                                • Set Variable [ $r; Value:MBS( "HotKey.SetPermanent"; $HotKey; 1 ) ]
                                                                                                                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: HotKeys

                                                                                                                              Used functions: