MBS FileMaker Plugin Example Databases

Shell Ping

All examples are included with download of MBS FileMaker Plugin.

Shell Ping.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts1
Value Lists0
Custom Functions0
Custom Menus0
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Shell
5 fields defined, 1 record
Shell

Fields

Table Name: Shell - 5 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
IPNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      OutputNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          ErrorNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              InputNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                    DescriptionNormal, TextAuto-Enter:
                    • Allow editing
                    Validation:
                    • Only during data entry
                    Storage:
                    • Repetitions: 1
                    • Indexing: None
                    • Automatically create indexes as needed
                    • Index Language: German

                          Layout Objects: Shell

                          Regular Fields

                          Field Name: Shell::IP
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 52 pt
                          • Left: 138 pt
                          • Bottom: 73 pt
                          • Right: 391 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: Shell::Output
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 54 pt
                          • Left: 570 pt
                          • Bottom: 258 pt
                          • Right: 1018 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: Shell::Error
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 263 pt
                          • Left: 568 pt
                          • Bottom: 467 pt
                          • Right: 1017 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: Shell::Description
                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                          • Top: 294 pt
                          • Left: 138 pt
                          • Bottom: 467 pt
                          • Right: 391 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: Ping
                          • Top: 81 pt
                          • Left: 259 pt
                          • Bottom: 113 pt
                          • Right: 391 pt
                          • Anchoring: Left, Top
                          Perform Script [ “Run” ]

                          Scripts:


                          Script Hierarchy

                          Run

                          Script NameRun
                          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 [ $shell; Value:MBS( "Shell.New" ) ]
                            • Set Field [ Shell::Output; "" ]
                            • Set Field [ Shell::Error; "" ]
                            • Commit Records/Requests [ No dialog ]
                            • Set Variable [ $s; Value:MBS( "Shell.AddArgument"; $shell; "-c") ]
                            • Set Variable [ $s; Value:MBS( "Shell.AddArgument"; $shell; "5") ]
                            • Set Variable [ $s; Value:MBS( "Shell.AddArgument"; $shell; Shell::IP) ]
                            • Set Variable [ $s; Value:MBS( "Shell.Execute"; $shell; "/sbin/ping") ]
                            • Set Variable [ $error; Value:"" ]
                            • Set Variable [ $result; Value:"" ]
                            • If [ MBS("IsError") ]
                            • Show Custom Dialog [ Title: "Failed to run"; Message: $s; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                            • Else
                            • If [ Length(Shell::Input) > 0 ]
                            • Set Variable [ $s; Value:MBS( "Shell.WriteInputText"; $shell; Shell::Input; "UTF-8") ]
                            • End If
                            • #Loop while app runs and collect messages
                            • Loop
                            • Pause/Resume Script [ Duration (seconds): ,1 ]
                            • Set Variable [ $error; Value:$error & MBS( "Shell.ReadErrorText"; $shell; "UTF-8") ]
                            • Set Variable [ $result; Value:$result & MBS( "Shell.ReadOutputText"; $shell; "UTF-8") ]
                            • Set Field [ Shell::Error; MBS( "Text.ReplaceNewline"; $error; 1) ]
                            • Set Field [ Shell::Output; MBS( "Text.ReplaceNewline"; $result; 1) ]
                            • Exit Loop If [ MBS( "Shell.IsRunning"; $shell) ≠ 1 ]
                            • End Loop
                            • Commit Records/Requests [ No dialog ]
                            • End If
                            • Set Variable [ $r; Value:MBS("Shell.Release"; $shell) ]
                            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: Shell Ping

                                    Used functions:




                                    Links
                                    MBS Xojo Plugins