MBS FileMaker Plugin Example Databases

CURL Low Level Sockets

All examples are included with download of MBS FileMaker Plugin.

CURL Low Level Sockets.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
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
CURL Low Level Sockets
5 fields defined, 1 record
CURL Low Level Sockets

Fields

Table Name: CURL Low Level Sockets - 5 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
URLNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      Debug MessagesNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Data SentNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              Data ReceivedNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  Connect ResultNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German

                      Layout Objects: CURL Low Level Sockets

                      Regular Fields

                      Field Name: CURL Low Level Sockets::URL
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 59 pt
                      • Left: 116 pt
                      • Bottom: 80 pt
                      • Right: 369 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: CURL Low Level Sockets::Debug Messages
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 112 pt
                      • Left: 116 pt
                      • Bottom: 524 pt
                      • Right: 369 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: CURL Low Level Sockets::Data Sent
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 57 pt
                      • Left: 470 pt
                      • Bottom: 191 pt
                      • Right: 738 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: CURL Low Level Sockets::Data Received
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 199 pt
                      • Left: 470 pt
                      • Bottom: 524 pt
                      • Right: 738 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: CURL Low Level Sockets::Connect Result
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 83 pt
                      • Left: 116 pt
                      • Bottom: 104 pt
                      • Right: 369 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: Connect
                      • Top: 57 pt
                      • Left: 749 pt
                      • Bottom: 91 pt
                      • Right: 899 pt
                      • Anchoring: Left, Top
                      Perform Script [ “Download” ]

                      Scripts:


                      Script Hierarchy

                      Clear
                      Download

                      Next Script: [Download]
                      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 [ CURL Low Level Sockets::Debug Messages; "" ]
                          • Set Field [ CURL Low Level Sockets::Data Sent; "" ]
                          • Set Field [ CURL Low Level Sockets::Data Received; "" ]
                          • Set Field [ CURL Low Level Sockets::Connect Result; "" ]
                          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 NameDownload
                                  Run script with full access privilegesOff
                                  Include In MenuYes
                                  Layouts that use this script
                                  Scripts that use this script
                                    Script Definition
                                    Script Steps
                                    • #Start new session
                                    • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                    • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                    • Set Variable [ $result; Value:MBS("CURL.SetOptionConnectOnly"; $curl; 1) ]
                                    • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; CURL Low Level Sockets::URL) ]
                                    • Set Variable [ $request; Value:"GET / HTTP/1.1¶Host: www.monkeybreadsoftware.de¶¶" // must end with two empty lines ]
                                    • Set Variable [ $request2; Value:MBS( "Text.ReplaceNewline"; $request; 3) ]
                                    • #RUN now
                                    • Set Field [ CURL Low Level Sockets::Connect Result; MBS("CURL.Perform"; $curl) ]
                                    • #Check result
                                    • Set Field [ CURL Low Level Sockets::Data Received; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                    • Set Field [ CURL Low Level Sockets::Debug Messages; MBS("CURL.GetDebugAsText"; $curl) ]
                                    • If [ CURL Low Level Sockets::Connect Result = "OK" ]
                                    • Set Variable [ $r; Value:MBS( "CURL.SendText"; $curl; $request2; "UTF-8") ]
                                    • Set Field [ CURL Low Level Sockets::Data Sent; $request ]
                                    • Set Variable [ $received; Value:"" ]
                                    • Loop
                                    • Pause/Resume Script [ Duration (seconds): ,1 ]
                                    • Set Variable [ $r; Value:MBS( "CURL.ReceiveText"; $curl; 100000; "UTF-8") ]
                                    • Set Variable [ $errorCode; Value:MBS( "CURL.ErrorCode"; $curl) ]
                                    • If [ GetAsNumber ( $errorCode ) = 81 ]
                                    • #wait
                                    • Else If [ GetAsNumber ( $errorCode ) = 0 ]
                                    • #got some data
                                    • Set Variable [ $received; Value:$received & $r ]
                                    • Exit Loop If [ $r = "" ]
                                    • Else
                                    • #error
                                    • Exit Loop If [ 1 ]
                                    • End If
                                    • End Loop
                                    • Set Variable [ $received2; Value:MBS( "Text.ReplaceNewline"; $received; 1) ]
                                    • Set Field [ CURL Low Level Sockets::Debug Messages; MBS("CURL.GetDebugAsText"; $curl) ]
                                    • Set Field [ CURL Low Level Sockets::Data Received; $received2 ]
                                    • End If
                                    • #Cleanup
                                    • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $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

                                            Download example: CURL Low Level Sockets

                                            Used functions:




                                            Links
                                            MBS Xojo Plugins