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

MBS FileMaker Plugin Example Databases

Printing iOS

All examples are included with download of MBS FileMaker Plugin.

Printing iOS.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts8
Value Lists2
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
OnFirstWindowOpenScript: Start
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Printing
8 fields defined, 1 record
Printing

Fields

Table Name: Printing - 8 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PathsNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: English
      ContainerNormal, BinaryAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
          PrinterURLNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: English
              PrinterIDNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: English
                  PrinterDisplayNameNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: English
                      OutputTypeNormal, TextAuto-Enter:
                      • Allow editing
                      Validation: Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: English
                          DuplexModeNormal, TextAuto-Enter:
                          • Allow editing
                          Validation: Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: English
                              Last SettingsNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: English

                                  Layout Objects: Printing

                                  Regular Fields

                                  Field Name: Printing::Paths
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 81 pt
                                  • Left: 9 pt
                                  • Bottom: 140 pt
                                  • Right: 315 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: Printing::Container
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 280 pt
                                  • Left: 6 pt
                                  • Bottom: 522 pt
                                  • Right: 312 pt
                                  • Anchoring: Left and Right, Top and Bottom
                                  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: Printing::PrinterURL
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 655 pt
                                  • Left: 84 pt
                                  • Bottom: 676 pt
                                  • Right: 312 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: Printing::PrinterID
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 678 pt
                                  • Left: 84 pt
                                  • Bottom: 699 pt
                                  • Right: 312 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: Printing::PrinterDisplayName
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 701 pt
                                  • Left: 84 pt
                                  • Bottom: 722 pt
                                  • Right: 312 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: Printing::OutputType
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 724 pt
                                  • Left: 84 pt
                                  • Bottom: 745 pt
                                  • Right: 312 pt
                                  • Anchoring: Left and Right, Top
                                  Field Format: 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: Printing::DuplexMode
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 747 pt
                                  • Left: 84 pt
                                  • Bottom: 768 pt
                                  • Right: 312 pt
                                  • Anchoring: Left and Right, Top
                                  Field Format: 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: Printing::Last Settings
                                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                  • Top: 875 pt
                                  • Left: 6 pt
                                  • Bottom: 1012 pt
                                  • Right: 311 pt
                                  • Anchoring: Left and Right, Top and Bottom
                                  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

                                  Merge Fields

                                  Field PropertiesCoordinatesFieldsQuick Find
                                    Text:
                                  • Installed Plug-ins
                                  • Top: 1026 pt
                                  • Left: 6 pt
                                  • Bottom: 1119 pt
                                  • Right: 314 pt
                                  • Anchoring: Left and Right, Top
                                    No

                                    Buttons

                                    Button PropertiesCoordinatesScript/Script Step
                                      Type:
                                    • Text: Open File
                                    • Top: 148 pt
                                    • Left: 9 pt
                                    • Bottom: 181 pt
                                    • Right: 145 pt
                                    • Anchoring: Left, Top
                                    Perform Script [ “Select file” ]

                                    Scripts:


                                    Button PropertiesCoordinatesScript/Script Step
                                      Type:
                                    • Text: Select Printer
                                    • Top: 777 pt
                                    • Left: 176 pt
                                    • Bottom: 810 pt
                                    • Right: 312 pt
                                    • Anchoring: Right, Top
                                    Perform Script [ “Select Printer” ]

                                    Scripts:


                                    Button PropertiesCoordinatesScript/Script Step
                                      Type:
                                    • Text: Print Container
                                    • Top: 529 pt
                                    • Left: 175 pt
                                    • Bottom: 562 pt
                                    • Right: 311 pt
                                    • Anchoring: Right, Top
                                    Perform Script [ “Print Container” ]

                                    Scripts:


                                    Button PropertiesCoordinatesScript/Script Step
                                      Type:
                                    • Text: Print File
                                    • Top: 148 pt
                                    • Left: 175 pt
                                    • Bottom: 181 pt
                                    • Right: 311 pt
                                    • Anchoring: Right, Top
                                    Perform Script [ “Print File” ]

                                    Scripts:


                                    Button PropertiesCoordinatesScript/Script Step
                                      Type:
                                    • Text: Print without Dialog
                                    • Top: 819 pt
                                    • Left: 175 pt
                                    • Bottom: 852 pt
                                    • Right: 311 pt
                                    • Anchoring: Right, Top
                                    Perform Script [ “Print Container” ]

                                    Scripts:


                                    Value Lists

                                    Value List NameSourceValuesOn Layouts
                                    OutputTypesCustom
                                    • General, Photo, Grayscale, PhotoGrayscale
                                    DuplexModesCustom
                                    • None, LongEdge, ShortEdge

                                    Script Hierarchy

                                    Start
                                    Select file
                                    DocumentPickerTrigger
                                    Select Printer
                                    Print Container
                                    Print File
                                    Print without dialog
                                    Trace on

                                    Next Script: [Select file]
                                    Script NameStart
                                    Run script with full access privilegesOff
                                    Siri Shortcut VisibleOff
                                    Include In MenuNo
                                    Layouts that use this script
                                      Scripts that use this script
                                        Script Definition
                                        Script Steps
                                        • Set Variable [ $available; Value:MBS("PDFKit.GetPrintOption"; "printingAvailable") ]
                                        • If [ $available = 0 ]
                                        • Show Custom Dialog [ Message: "Printing not available on this iOS device."; Default Button: “OK”, Commit: “Yes” ]
                                        • 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: [Start]Next Script: [DocumentPickerTrigger]
                                                      Script NameSelect file
                                                      Run script with full access privilegesOff
                                                      Siri Shortcut VisibleOff
                                                      Include In MenuYes
                                                      Layouts that use this script
                                                      Scripts that use this script
                                                        Script Definition
                                                        Script Steps
                                                        • Set Variable [ $r; Value:MBS( "DocumentPicker.SetTrigger"; Get(FileName); "DocumentPickerTrigger" ) ]
                                                        • Set Variable [ $Types; Value:"public.jpeg¶public.png¶com.adobe.pdf" ]
                                                        • Set Variable [ $r; Value:MBS( "DocumentPicker.Open"; $Types; 0 ) ]
                                                        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: [Select file]Next Script: [Select Printer]
                                                                      Script NameDocumentPickerTrigger
                                                                      Run script with full access privilegesOff
                                                                      Siri Shortcut VisibleOff
                                                                      Include In MenuYes
                                                                      Layouts that use this script
                                                                        Scripts that use this script
                                                                          Script Definition
                                                                          Script Steps
                                                                          • Set Field [ Printing::Paths; MBS( "DocumentPicker.Files" ) ]
                                                                          • Set Variable [ $path; Value:GetValue(Printing::Paths; 1) ]
                                                                          • If [ Length ( $path ) > 0 ]
                                                                          • Set Field [ Printing::Container; MBS( "Container.ReadFile"; $path; "auto") ]
                                                                          • Else
                                                                          • Set Field [ Printing::Container; "" ]
                                                                          • 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: [DocumentPickerTrigger]Next Script: [Print Container]
                                                                                  Script NameSelect Printer
                                                                                  Run script with full access privilegesOff
                                                                                  Siri Shortcut VisibleOff
                                                                                  Include In MenuYes
                                                                                  Layouts that use this script
                                                                                  Scripts that use this script
                                                                                    Script Definition
                                                                                    Script Steps
                                                                                    • If [ Length ( Printing::PrinterURL) > 0 ]
                                                                                    • #we had one selected before, so pick it
                                                                                    • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "PrinterURL"; Printing::PrinterURL) ]
                                                                                    • End If
                                                                                    • #show the dialog
                                                                                    • Set Variable [ $userDidSelect; Value:MBS( "PDFKit.SelectPrinter" ) ]
                                                                                    • If [ MBS("IsError") ]
                                                                                    • Show Custom Dialog [ Title: "Failed to show printer selector"; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                    • Else If [ $userDidSelect ]
                                                                                    • #and check what we got
                                                                                    • Set Field [ Printing::PrinterURL; MBS( "PDFKit.GetPrintSetting"; "PrinterURL" ) ]
                                                                                    • Set Field [ Printing::PrinterDisplayName; MBS("PDFKit.GetPrintSetting"; "PrinterDisplayName") ]
                                                                                    • 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: [Select Printer]Next Script: [Print File]
                                                                                            Script NamePrint Container
                                                                                            Run script with full access privilegesOff
                                                                                            Siri Shortcut VisibleOff
                                                                                            Include In MenuYes
                                                                                            Layouts that use this script
                                                                                            Scripts that use this script
                                                                                              Script Definition
                                                                                              Script Steps
                                                                                              • If [ IsEmpty ( Printing::Container ) ]
                                                                                              • Show Custom Dialog [ Title: "Empty container?"; Message: "Please import something to the container or pick a file."; Default Button: “OK”, Commit: “Yes” ]
                                                                                              • Exit Script [ ]
                                                                                              • End If
                                                                                              • #pick printer from field
                                                                                              • If [ Length ( Printing::PrinterID ) > 0 ]
                                                                                              • #take one from our record
                                                                                              • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "PrinterID"; Printing::PrinterID) ]
                                                                                              • End If
                                                                                              • #some settings
                                                                                              • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "ShowsPrintPanel"; 1 ) ]
                                                                                              • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "ShowsNumberOfCopies"; 1 ) ]
                                                                                              • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "ShowsPaperOrientation"; 1 ) ]
                                                                                              • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "OutputType"; Printing::OutputType ) ]
                                                                                              • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "DuplexMode"; Printing::DuplexMode ) ]
                                                                                              • #Print
                                                                                              • Set Variable [ $r; Value:MBS("PDFKit.Print"; Printing::Container) ]
                                                                                              • If [ MBS("IsError") ]
                                                                                              • Show Custom Dialog [ Title: "Failed to print file"; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                              • Else
                                                                                              • Set Field [ Printing::PrinterID; MBS("PDFKit.GetPrintSetting"; "PrinterID") ]
                                                                                              • Set Field [ Printing::PrinterDisplayName; MBS("PDFKit.GetPrintSetting"; "PrinterDisplayName") ]
                                                                                              • End If
                                                                                              • #show settings
                                                                                              • Set Field [ Printing::Last Settings; MBS("PDFKit.GetPrintSetting"; "LastSettings") ]
                                                                                              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: [Print Container]Next Script: [Print without dialog]
                                                                                                      Script NamePrint File
                                                                                                      Run script with full access privilegesOff
                                                                                                      Siri Shortcut VisibleOff
                                                                                                      Include In MenuYes
                                                                                                      Layouts that use this script
                                                                                                      Scripts that use this script
                                                                                                        Script Definition
                                                                                                        Script Steps
                                                                                                        • #Print
                                                                                                        • Set Variable [ $path; Value:GetValue(Printing::Paths; 1) ]
                                                                                                        • If [ Length ( $path ) = 0 ]
                                                                                                        • Show Custom Dialog [ Title: "No file path?"; Message: "Please import something to the container or pick a file."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                        • Exit Script [ ]
                                                                                                        • End If
                                                                                                        • #pick printer from field
                                                                                                        • If [ Length ( Printing::PrinterID ) > 0 ]
                                                                                                        • #take one from our record
                                                                                                        • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "PrinterID"; Printing::PrinterID) ]
                                                                                                        • End If
                                                                                                        • #some settings
                                                                                                        • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "ShowsPrintPanel"; 1 ) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "ShowsNumberOfCopies"; 1 ) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "ShowsPaperOrientation"; 1 ) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "OutputType"; Printing::OutputType ) ]
                                                                                                        • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "DuplexMode"; Printing::DuplexMode ) ]
                                                                                                        • #print
                                                                                                        • Set Variable [ $r; Value:MBS("PDFKit.Print"; $path) ]
                                                                                                        • If [ MBS("IsError") ]
                                                                                                        • Show Custom Dialog [ Title: "Failed to print file"; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                                                                        • Else
                                                                                                        • Set Field [ Printing::PrinterID; MBS("PDFKit.GetPrintSetting"; "PrinterID") ]
                                                                                                        • Set Field [ Printing::PrinterDisplayName; MBS("PDFKit.GetPrintSetting"; "PrinterDisplayName") ]
                                                                                                        • End If
                                                                                                        • #show settings
                                                                                                        • Set Field [ Printing::Last Settings; MBS("PDFKit.GetPrintSetting"; "LastSettings") ]
                                                                                                        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: [Print File]Next Script: [Trace on]
                                                                                                                Script NamePrint without dialog
                                                                                                                Run script with full access privilegesOff
                                                                                                                Siri Shortcut VisibleOff
                                                                                                                Include In MenuYes
                                                                                                                Layouts that use this script
                                                                                                                  Scripts that use this script
                                                                                                                    Script Definition
                                                                                                                    Script Steps
                                                                                                                    • #Print
                                                                                                                    • Set Variable [ $path; Value:GetValue(Printing::Paths; 1) ]
                                                                                                                    • If [ Length ( $path ) = 0 ]
                                                                                                                    • If [ IsEmpty ( Printing::Container ) ]
                                                                                                                    • Show Custom Dialog [ Title: "No file path or container?"; Message: "Please import something to the container or pick a file."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                    • Exit Script [ ]
                                                                                                                    • Else
                                                                                                                    • Set Variable [ $PrintItem; Value:Printing::Container ]
                                                                                                                    • End If
                                                                                                                    • Else
                                                                                                                    • Set Variable [ $PrintItem; Value:$path ]
                                                                                                                    • End If
                                                                                                                    • #Print
                                                                                                                    • Set Variable [ $printerURL; Value:MBS( "PDFKit.GetPrintSetting"; "PrinterURL" ) ]
                                                                                                                    • If [ Length ( Printing::PrinterURL ) > 0 ]
                                                                                                                    • #take one from our record
                                                                                                                    • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "PrinterURL"; Printing::PrinterURL) ]
                                                                                                                    • Else If [ Length ( $printerURL > 0 ) ]
                                                                                                                    • #we got one picked
                                                                                                                    • Else
                                                                                                                    • Show Custom Dialog [ Title: "No printer selected."; Message: "Please pick a printer first."; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                    • Exit Script [ ]
                                                                                                                    • End If
                                                                                                                    • #set a few options
                                                                                                                    • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "OutputType"; Printing::OutputType ) ]
                                                                                                                    • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "DuplexMode"; Printing::DuplexMode ) ]
                                                                                                                    • #print it without dialog
                                                                                                                    • Set Variable [ $r; Value:MBS( "PDFKit.SetPrintSetting"; "ShowsPrintPanel"; 0 ) ]
                                                                                                                    • Set Variable [ $r; Value:MBS("PDFKit.Print"; $PrintItem) ]
                                                                                                                    • If [ MBS("IsError") ]
                                                                                                                    • Show Custom Dialog [ Title: "Failed to print"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                                    • Else
                                                                                                                    • Set Field [ Printing::PrinterID; MBS("PDFKit.GetPrintSetting"; "PrinterID") ]
                                                                                                                    • Set Field [ Printing::PrinterDisplayName; MBS("PDFKit.GetPrintSetting"; "PrinterDisplayName") ]
                                                                                                                    • End If
                                                                                                                    • #show settings
                                                                                                                    • Set Field [ Printing::Last Settings; MBS("PDFKit.GetPrintSetting"; "LastSettings") ]
                                                                                                                    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: [Print without dialog]
                                                                                                                            Script NameTrace on
                                                                                                                            Run script with full access privilegesOff
                                                                                                                            Siri Shortcut VisibleOff
                                                                                                                            Include In MenuYes
                                                                                                                            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

                                                                                                                                              Download example: Printing iOS

                                                                                                                                              Used functions: