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

MBS FileMaker Plugin Example Databases

FSEvents

All examples are included with download of MBS FileMaker Plugin.

FSEvents.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
OnLastWindowCloseScript: Shutdown
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
FSEvents
6 fields defined, 0 record
FSEvents

Fields

Table Name: FSEvents - 6 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PathNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      FlagsNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          IDNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              LastIDNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Global
              • Repetitions: 1
              • Index Language: German
                  StreamRefNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Global
                  • Repetitions: 1
                  • Index Language: German
                      TimeNormal, TimestampAuto-Enter:
                      • Creation timestamp
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German

                            Layout Objects: FSEvents

                            Regular Fields

                            Field Name: FSEvents::LastID
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 4 pt
                            • Left: 311 pt
                            • Bottom: 23 pt
                            • Right: 564 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: FSEvents::StreamRef
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 27 pt
                            • Left: 311 pt
                            • Bottom: 46 pt
                            • Right: 564 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: FSEvents::Path
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 60 pt
                            • Left: 79 pt
                            • Bottom: 79 pt
                            • Right: 919 pt
                            • Anchoring: Left and Right, 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: FSEvents::Flags
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 86 pt
                            • Left: 79 pt
                            • Bottom: 105 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: FSEvents::ID
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 86 pt
                            • Left: 371 pt
                            • Bottom: 105 pt
                            • Right: 624 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: FSEvents::Time
                            Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                            • Top: 87 pt
                            • Left: 678 pt
                            • Bottom: 106 pt
                            • Right: 919 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: Initialize and watch Desktop
                            • Top: 5 pt
                            • Left: 12 pt
                            • Bottom: 35 pt
                            • Right: 230 pt
                            • Anchoring: Left, Top
                            Perform Script [ “Init” ]

                            Scripts:


                            Script Hierarchy

                            Init
                            FSEventsNotification
                            Shutdown
                            Clear

                            Next Script: [FSEventsNotification]
                            Script NameInit
                            Run script with full access privilegesOff
                            Include In MenuYes
                            Layouts that use this script
                            Scripts that use this script
                              Script Definition
                              Script Steps
                              • Delete All Records [ No dialog ]
                              • Set Variable [ $path; Value:MBS( "Folders.UserDesktop" ) ]
                              • Set Variable [ $sinceWhen; Value:"now" ]
                              • If [ not IsEmpty(FSEvents::LastID) ]
                              • Set Variable [ $sinceWhen; Value:FSEvents::LastID ]
                              • End If
                              • Set Variable [ $fstream; Value:MBS("FSEvents.Create"; $path; $sinceWhen; "IgnoreSelf, FileEvents, WatchRoot"; 2) ]
                              • If [ MBS("IsError") ]
                              • Show Custom Dialog [ Title: "Error"; Message: "Failed to create file system event monitor."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                              • Else
                              • Set Variable [ $r; Value:MBS("FSEvents.SetFilename"; $fstream; Get(FileName)) ]
                              • Set Variable [ $r; Value:MBS("FSEvents.SetScriptName"; $fstream; "FSEventsNotification") ]
                              • Set Variable [ $r; Value:MBS("FSEvents.Start"; $fstream) ]
                              • If [ $r = 1 ]
                              • Set Field [ FSEvents::StreamRef; $fstream ]
                              • Else
                              • Show Custom Dialog [ Title: "Error"; Message: "Failed to start file system event monitor."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                              • Set Variable [ $r; Value:MBS("FSEvents.Release"; $fstream) ]
                              • End If
                              • 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: [Init]Next Script: [Shutdown]
                                      Script NameFSEventsNotification
                                      Run script with full access privilegesOff
                                      Include In MenuYes
                                      Layouts that use this script
                                        Scripts that use this script
                                          Script Definition
                                          Script Steps
                                          • Set Variable [ $stream; Value:Get(ScriptParameter) ]
                                          • Loop
                                          • Exit Loop If [ MBS("FSEvents.HasNextEvent"; $stream) ≠ 1 ]
                                          • Set Variable [ $e; Value:MBS("FSEvents.NextEvent"; $stream) ]
                                          • Set Variable [ $path; Value:GetValue($e; 1) ]
                                          • Set Variable [ $id; Value:GetValue($e; 2) ]
                                          • Set Variable [ $flagsNumber; Value:GetValue($e; 3) ]
                                          • Set Variable [ $flagsText; Value:GetValue($e; 4) ]
                                          • New Record/Request
                                          • Set Field [ FSEvents::Path; $path ]
                                          • Set Field [ FSEvents::Flags; $flagsText ]
                                          • Set Field [ FSEvents::ID; $id ]
                                          • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                          • End Loop
                                          • If [ not IsEmpty($id) ]
                                          • Set Field [ FSEvents::LastID; $id ]
                                          • 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: [FSEventsNotification]Next Script: [Clear]
                                                  Script NameShutdown
                                                  Run script with full access privilegesOff
                                                  Include In MenuYes
                                                  Layouts that use this script
                                                    Scripts that use this script
                                                      Script Definition
                                                      Script Steps
                                                      • If [ IsEmpty(FSEvents::StreamRef) ]
                                                      • #nothing to do
                                                      • Else
                                                      • #cleanup
                                                      • Set Variable [ $r; Value:MBS("FSEvents.Release"; FSEvents::StreamRef) ]
                                                      • Set Field [ FSEvents::StreamRef; "" ]
                                                      • 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: [Shutdown]
                                                              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
                                                                  • Delete All Records [ No dialog ]
                                                                  • Set Field [ FSEvents::LastID; "" ]
                                                                  • Set Field [ FSEvents::StreamRef; "" ]
                                                                  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: FSEvents

                                                                          Used functions: