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

MBS FileMaker Plugin Example Databases

CURL Download on Server

All examples are included with download of MBS FileMaker Plugin.

CURL Download on Server.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts6
Value Lists0
Custom Functions0
Custom Menus24
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
test
3 fields defined, 1 record
test

Fields

Table Name: test - 3 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
MessagesNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      ResultNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          HeaderNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German

              Layout Objects: test

              Regular Fields

              Field Name: test::Messages
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 52 pt
              • Left: 138 pt
              • Bottom: 253 pt
              • Right: 843 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: test::Result
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 495 pt
              • Left: 138 pt
              • Bottom: 516 pt
              • Right: 843 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: test::Header
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 262 pt
              • Left: 138 pt
              • Bottom: 482 pt
              • Right: 843 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: Download Local
              • Top: 101 pt
              • Left: 12 pt
              • Bottom: 157 pt
              • Right: 114 pt
              • Anchoring: Left, Top
              Perform Script [ “Download Local” ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Trace Server
              • Top: 277 pt
              • Left: 13 pt
              • Bottom: 333 pt
              • Right: 111 pt
              • Anchoring: Left, Top
              Perform Script on Server [ “Trace Server” ] [ Wait for completion ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Download Server
              • Top: 180 pt
              • Left: 13 pt
              • Bottom: 236 pt
              • Right: 111 pt
              • Anchoring: Left, Top
              Perform Script on Server [ “Download Local” ] [ Wait for completion ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Register
              • Top: 354 pt
              • Left: 13 pt
              • Bottom: 411 pt
              • Right: 110 pt
              • Anchoring: Left, Top
              Perform Script [ “MBS Load Register Script” ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Trace Local
              • Top: 432 pt
              • Left: 16 pt
              • Bottom: 489 pt
              • Right: 114 pt
              • Anchoring: Left, Top
              Perform Script [ “Trace Server” ]

              Scripts:


              Script Hierarchy

              Download Local
              Download Server
              Trace Server
              MBS Load Register Script
              MBS Register Script
              Clear

              Next Script: [Download Server]
              Script NameDownload Local
              Run script with full access privilegesOff
              Include In MenuNo
              Layouts that use this script
              Scripts that use this script
                Script Definition
                Script Steps
                • Set Variable [ $curl; Value:MBS("CURL.New") ]
                • Set Variable [ $r; Value:MBS("CURL.SetOptionVerbose"; $curl; 1) ]
                • #As you see we download directly to file in public folder on Windows:
                • If [ MBS("SystemInfo.isMacOSX") ]
                • Set Variable [ $path; Value:"/Users/Shared/test.jpg" ]
                • Else
                • Set Variable [ $path; Value:"C:\Users\Public\test.jpg" ]
                • End If
                • Set Variable [ $r; Value:MBS("CURL.CreateOutputFile"; $curl; $path) ]
                • #set a few options...
                • Set Variable [ $r; Value:MBS("CURL.SetOptionURL"; $curl; "http://www.monkeybreadsoftware.de/images/MBSLogo.jpg") ]
                • Set Field [ test::Result; MBS("CURL.Perform"; $curl) ]
                • Set Field [ test::Messages; MBS("CURL.GetDebugMessages"; $curl) ]
                • Set Field [ test::Header; MBS("CURL.GetHeaders"; $curl) ]
                • Set Variable [ $result; Value:MBS("CURL.Release"; $curl) ]
                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: [Download Local]Next Script: [Trace Server]
                        Script NameDownload Server
                        Run script with full access privilegesOff
                        Include In MenuNo
                        Layouts that use this script
                          Scripts that use this script
                            Script Definition
                            Script Steps
                            • Set Variable [ $curl; Value:MBS("CURL.New") ]
                            • #As you see we download directly to file in the Server folder on Windows
                            • If [ MBS("SystemInfo.isMacOSX") ]
                            • Set Variable [ $path; Value:"/Libary/FileMaker Server/Data/Documents/test.jpg" ]
                            • Else
                            • Set Variable [ $path; Value:"C:\Program Files\FileMaker\FileMaker Server\Data\Documents\test.jpg" ]
                            • End If
                            • Set Variable [ $r; Value:MBS("CURL.CreateOutputFile"; $curl; $path) ]
                            • #set a few options...
                            • Set Variable [ $r; Value:MBS("CURL.SetOptionVerbose"; $curl; 1) ]
                            • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "http://www.monkeybreadsoftware.de/images/MBSLogo.jpg") ]
                            • Set Field [ test::Result; MBS("CURL.Perform"; $curl) ]
                            • Set Field [ test::Messages; MBS("CURL.GetDebugMessages"; $curl) ]
                            • Set Field [ test::Header; MBS("CURL.GetHeaders"; $curl) ]
                            • Set Variable [ $result; Value:MBS("CURL.Release"; $curl) ]
                            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: [Download Server]Next Script: [MBS Load Register Script]
                                    Script NameTrace Server
                                    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 [ $t; 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 Server]Next Script: [MBS Register Script]
                                                    Script NameMBS Load Register Script
                                                    Run script with full access privilegesOff
                                                    Include In MenuYes
                                                    Layouts that use this script
                                                    Scripts that use this script
                                                      Script Definition
                                                      Script Steps
                                                      • Perform Script [ “MBS Register Script” ]
                                                      • Perform Script on Server [ “MBS Register Script” ]
                                                      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: [MBS Load Register Script]Next Script: [Clear]
                                                                  Script NameMBS Register Script
                                                                  Run script with full access privilegesOff
                                                                  Include In MenuYes
                                                                  Layouts that use this script
                                                                    Scripts that use this script
                                                                    Script Definition
                                                                    Script Steps
                                                                    • If [ MBS("IsRegistered") ≠1 ]
                                                                    • #Put in your license keys here
                                                                    • If [ MBS("IsServer") ]
                                                                    • Set Variable [ $r; Value:MBS("Register"; "..."; "Complete"; "Server"; 201510; 123) ]
                                                                    • Else
                                                                    • Set Variable [ $r; Value:MBS("Register"; "..."; "Complete"; "5 seats"; 201601; 123) ]
                                                                    • End If
                                                                    • End If
                                                                    • Set Variable [ $i; Value:MBS("IsRegistered") ]
                                                                    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: [MBS Register Script]
                                                                                  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
                                                                                      • Set Field [ test::Result; "" ]
                                                                                      • Set Field [ test::Header; "" ]
                                                                                      • Set Field [ test::Messages; "" ]
                                                                                      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: CURL Download on Server

                                                                                              Used functions: