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

MBS FileMaker Plugin Example Databases

WebViewer Copy Text

All examples are included with download of MBS FileMaker Plugin.

WebViewer Copy Text.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 8
Value Lists 0
Custom Functions 0
Custom Menus 33
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Minimalist
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
WebViewer Copy Text
4 fields defined, 1 record
WebViewer Copy Text

Fields

Table Name: WebViewer Copy Text - 4 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
URL Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      Text Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          HTML Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              StyledText Normal, Text Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German

                  Layout Objects: WebViewer Copy Text

                  Regular Fields

                  Field Name: WebViewer Copy Text::URL
                  Field Properties Coordinates Field Format Field Behavior Quick Find
                  • Top: 24 pt
                  • Left: 138 pt
                  • Bottom: 45 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: System Default
                  • Go to next field using: Tab key
                  Yes

                  Field Name: WebViewer Copy Text::Text
                  Field Properties Coordinates Field Format Field Behavior Quick Find
                  • Top: 54 pt
                  • Left: 138 pt
                  • Bottom: 267 pt
                  • Right: 553 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  Yes

                  Field Name: WebViewer Copy Text::HTML
                  Field Properties Coordinates Field Format Field Behavior Quick Find
                  • Top: 276 pt
                  • Left: 138 pt
                  • Bottom: 489 pt
                  • Right: 553 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: WebViewer Copy Text::StyledText
                  Field Properties Coordinates Field Format Field Behavior Quick Find
                  • Top: 498 pt
                  • Left: 138 pt
                  • Bottom: 711 pt
                  • Right: 553 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 Properties Coordinates Script/Script Step
                    Type:
                  • Text: Copy Text
                    Additional Properties:
                  • Change to hand cursor over button
                  • Top: 25 pt
                  • Left: 408 pt
                  • Bottom: 45 pt
                  • Right: 553 pt
                  • Anchoring: Left, Top
                  Perform Script [ “GetText” ]

                  Scripts:


                  Web Viewer Controls

                  Web Viewer Control Properties Coordinates Web Address
                    Object Name:
                  • web
                    Additional Properties:
                  • Allow interaction with web viewer content
                  • Display progress bar
                  • Display status messages
                  • Automatically encode URL
                  • Top: 24 pt
                  • Left: 570 pt
                  • Bottom: 711 pt
                  • Right: 1075 pt
                  • Anchoring: Left, Top

                  Script Hierarchy

                  GetText
                  Load URL
                  Clear
                  Zoom In
                  Zoom Out
                  Set Zoom 1.0
                  Set Zoom 2.0
                  Reset Zoom

                  Next Script: [Load URL]
                  Script Name GetText
                  Run script with full access privileges Off
                  Siri Shortcut Visible Off
                  Include In Menu Yes
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    • #load website
                    • Set Web Viewer [ Object Name: "web"; URL: WebViewer Copy Text::URL ]
                    • #wait a bit for the page to load
                    • Pause/Resume Script [ Duration (seconds): ,5 ]
                    • Loop [ Flush: Always ]
                    • Set Variable [ $r; Value:MBS("WebView.IsLoading"; "web") ]
                    • Exit Loop If [ $r ≠ 1 ]
                    • Pause/Resume Script [ Duration (seconds): ,5 ]
                    • End Loop
                    • #now copy text
                    • Set Field [ WebViewer Copy Text::Text; MBS("Webview.GetPlainText"; "web") ]
                    • Set Field [ WebViewer Copy Text::HTML; MBS("Webview.GetHTMLText"; "web") ]
                    • Set Variable [ $r; Value:MBS("WebView.SelectAll"; "web") ]
                    • Pause/Resume Script [ Duration (seconds): ,3 ]
                    • Set Variable [ $r; Value:MBS("WebView.Copy"; "web") ]
                    • Pause/Resume Script [ Duration (seconds): ,3 ]
                    • Go to Field [ WebViewer Copy Text::StyledText ]
                    • Paste [ WebViewer Copy Text::StyledText ] [ Select ]
                    • Set Variable [ $r; Value:MBS("WebView.ClearSelection"; "web") ]
                    • Go to Field [ ]
                    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: [GetText] Next Script: [Clear]
                            Script Name Load URL
                            Run script with full access privileges Off
                            Siri Shortcut Visible Off
                            Include In Menu Yes
                            Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                • #load website
                                • Set Web Viewer [ Object Name: "web"; URL: WebViewer Copy Text::URL ]
                                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: [Load URL] Next Script: [Zoom In]
                                        Script Name Clear
                                        Run script with full access privileges Off
                                        Siri Shortcut Visible Off
                                        Include In Menu Yes
                                        Layouts that use this script
                                          Scripts that use this script
                                            Script Definition
                                            Script Steps
                                            • Replace Field Contents [ WebViewer Copy Text::Text; Replace with calculation: "" ] [ No dialog ]
                                            • Replace Field Contents [ WebViewer Copy Text::HTML; Replace with calculation: "" ] [ No dialog ]
                                            • Replace Field Contents [ WebViewer Copy Text::StyledText; Replace with calculation: "" ] [ No dialog ]
                                            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] Next Script: [Zoom Out]
                                                    Script Name Zoom In
                                                    Run script with full access privileges Off
                                                    Siri Shortcut Visible Off
                                                    Include In Menu Yes
                                                    Layouts that use this script
                                                      Scripts that use this script
                                                        Script Definition
                                                        Script Steps
                                                        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: [Zoom In] Next Script: [Set Zoom 1.0]
                                                                      Script Name Zoom Out
                                                                      Run script with full access privileges Off
                                                                      Siri Shortcut Visible Off
                                                                      Include In Menu Yes
                                                                      Layouts that use this script
                                                                        Scripts that use this script
                                                                          Script Definition
                                                                          Script Steps
                                                                          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: [Zoom Out] Next Script: [Set Zoom 2.0]
                                                                                        Script Name Set Zoom 1.0
                                                                                        Run script with full access privileges Off
                                                                                        Siri Shortcut Visible Off
                                                                                        Include In Menu Yes
                                                                                        Layouts that use this script
                                                                                          Scripts that use this script
                                                                                            Script Definition
                                                                                            Script Steps
                                                                                            • #several ways to do this
                                                                                            • Set Variable [ $r1; Value:MBS("WebView.CanResetPageZoom"; "web") ]
                                                                                            • Set Variable [ $r2; Value:MBS("WebView.CanZoomPageIn"; "web") ]
                                                                                            • Set Variable [ $r3; Value:MBS("WebView.CanZoomPageOut"; "web") ]
                                                                                            • Set Variable [ $r; Value:MBS("WebView.SetZoom"; "web"; 100) ]
                                                                                            • // Set Variable [ $r; Value:MBS("WebView.setPageSizeMultiplier"; "web"; 1) ]
                                                                                            • // Set Variable [ $r; Value:MBS("WebView.resetPageZoom"; "web") ]
                                                                                            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: [Set Zoom 1.0] Next Script: [Reset Zoom]
                                                                                                          Script Name Set Zoom 2.0
                                                                                                          Run script with full access privileges Off
                                                                                                          Siri Shortcut Visible Off
                                                                                                          Include In Menu Yes
                                                                                                          Layouts that use this script
                                                                                                            Scripts that use this script
                                                                                                              Script Definition
                                                                                                              Script Steps
                                                                                                              • #several ways to do this
                                                                                                              • Set Variable [ $r; Value:MBS("WebView.setPageSizeMultiplier"; "web"; 2) ]
                                                                                                              • // Set Variable [ $r; Value:MBS("WebView.SetZoom"; "web"; 200) ]
                                                                                                              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: [Set Zoom 2.0]
                                                                                                                            Script Name Reset Zoom
                                                                                                                            Run script with full access privileges Off
                                                                                                                            Siri Shortcut Visible Off
                                                                                                                            Include In Menu Yes
                                                                                                                            Layouts that use this script
                                                                                                                              Scripts that use this script
                                                                                                                                Script Definition
                                                                                                                                Script Steps
                                                                                                                                • #You could also just zoom to 1.0
                                                                                                                                • Set Variable [ $r1; Value:MBS("WebView.CanResetPageZoom"; "web") ]
                                                                                                                                • Set Variable [ $r; Value:MBS("WebView.resetPageZoom"; "web") ]
                                                                                                                                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: WebViewer Copy Text

                                                                                                                                              Used functions: