With 39 functions in MBS Plugin related to serial ports, you can:
Use serial ports on MacOS and Windows
List real ports, virtual ports and those provided via USB adapters
Connect to serial port
Configure baud rate, parity, data and stop bits.
Set CTS, DSR, DTR, RTS, XON flags
Send text in any encoding, raw bytes as hex string or individual bytes.
Get a script triggered for new data coming in
Read data as text in any encoding, raw bytes as hex or single bytes.
Read text till new line
Suspend and Resume the port
Check for available bytes in incoming buffer
You can either work with tight loops to make script pauses till data is arriving or work completely asynchronously with script triggers to handle events when they occur. Great for barcode scanners, scales and various measurement devices.
All working from older FileMaker 7 up to latest FileMaker 18.
Of course FileMaker can open an Microsoft Access database with help of MBS FileMaker Plugin. You can open an access database via SQL functions and run queries, execute SQL commands and copy data from/to the database.
e.g. connect to a Microsoft Access Database via ODBC:
So pass to SQL.Connect a connection string including file Path and driver name. Optionally add user name and password as parameters. Be sure the installed Microsoft Access Driver has some 32 or 64 bit number as the FileMaker application.
You can call this function in a script just before FileMaker shows a dialog. The plugin will watch for new dialogs to show up and the next dialog to come is adjusted. We check if you provided a new X/Y coordinate and if so move the dialog. If you got us a new width and height, we resize the dialog. And if you set the center flag, we finally center the window on screen.
Works fine on MacOS and Windows so far in various FileMaker versions. We hope the function will help people with multiple screens to position the dialogs better.
Coming with next prerelease. Please do not hesitate to contact us questions.
PS: We added already the option to pass 2 for center parameter to center in front of FileMaker window.
Until today you could only play video in FileMaker using an interactive container or loading the video in a web viewer. Now you get a new way using our brand new WMFP functions. The MBS Plugin loads a video, creates a video view and places it on top of the FileMaker layout. The video plays independent of FileMaker.
The new functions give you some interesting options. For example you can play audio without user interface in the background. Just by initializing the player without a reference to a window with WMFP.Create. FileMaker users can switch to other layouts, use dialogs and use FileMaker without disturbing the audio. You can control volume, balance and playback rate via script. If the playback reaches the end, we can trigger a script, so you can load another player to play the next song (see WMFP.SetPlaybackEndedScriptTrigger).
Video view on Layout
You can put a rectangle on the layout and tell the plugin to place the video there. The plugin puts the control on top of the FileMaker layout area. By using an existing control on the user interface, you control the position and size of the video area. In a script for resizing the layout you can adjust the video size using WMFP.SetFrame function.
If you use cards, registers or switch layouts, you may want to use WMFP.SetVisible to show/hide the video when needed.
A video is loaded asynchronously. With WMFP.GetState you can query whether video is loaded, paused, playing or stopped. To change you can just call WMFP.Play to start playback and pause later if needed (WMFP.Pause).
You can change playback rate with WMFP.SetRate to play half speed or double speed. With balance control (WMFP.SetBalance) you can direct all sound to left or right speaker only. The WMFP.SetMute function can mute the sound.
If the video gets a letter box, you can set the background color with WMFP.SetBorder function.
When you use the functions, you need to have files on disk, so you need to export them from a container first. Then pass file URL for the file to the WMFP.Create function, if needed by converting path using Path.FilePathToFileURL function.
As video plays independent of what FileMaker does, you can of course just run a video while FileMaker runs a script to do some work. Instead of just waiting 30 seconds to sort records, you can show a video with a nice animation about sorting.
Have you inserted a video into an interactive container field on Windows and when playing the video looks like this?
To increase the security of the TLS connections you make with our CURL plugin functions, you can pin the certificate. That means you store a hash of the public key in the certificate and CURL checks this hash against the public key sent from the server. If the hash does not match, the connection is closed and you get back error code 90 with message "SSL: public key does not match pinned public key!".
If you like to see the certificate, you can use set cert info option to true. The plugin collects the certificate information and you can later query it. Use CURL.SetOptionCertInfo and CURL.GetCertInfo functions in MBS FileMaker Plugin for this. In our MBS Xojo CURL Plugin, please use OptionCertInfo property and GetInfoCertInfo method. The information includes the parsed certificate details as well as the PEM style certificate data.
Now in order to use pined certificate, you need the hash, but how to get it?
You could use the openssl command line instructions from the CURLOPT_PINNEDPUBLICKEY documentation page. But there is an easier way. Just put in a hash like "sha256//xxx" with OptionPinnedPublicKey in the plugin. Do your request and in the debug log you find a message like this:
public key hash: sha256//dhF0fnWyRh66b9UWMzm1TdEREOw4vkMunNGZQo0VZSE=
SSL: public key does not match pinned public key!
And now you can simply copy this hash and pass it to the option for the next connection. Don't forget the "sha256//" prefix. Once the hash matches the connection will continue.
Your code can check for the result of the CURL and inform the user if the public key changed. Now it may be good to compare the cert info output to the last one you may have saved and see if they website just renewed their certificate or whether someone tries to hack you and use a fake certificate. If the certificate was renewed with the same private key, the public key won't change.
Don't forget to use a list of acceptable root certificates and let CURL verify the certificates, too. See CAPath option and get cacert.pem from curl website.
For next MBS FileMaker Plugin we add a new CoreML functions to update the model on device. If you have an updatable model for CoreML, the Apple framework to use machine learning on Mac and iOS devices (including iPad), then you can now use our CoreML.Update function to pass new training data to the plugin and we update the model.
You can load a model with CoreML.OpenModel and you get the description with CoreML.Description, you now see there a new entry trainingInputDescriptionsByName in the JSON. e.g.
This shows you there is a drawing parameter for the picture with 28 by 28 pixel resolution in grayscale. The other parameter is the label with the correct output for this image. In a sample call to CoreML.Update we pass input and output paths for the model files and pass the training data as JSON:
In the JSON we expect an array of objects. Each object contains the pairs of input and output parameters. Values are passed as numbers, text or objects. For images we decided to allow you to pass the image file as native file path and then the plugin adjust images as needed.
You can build solutions which come with a pre-calculated machine learning model, which is then adjusted on device (e.g. iPad) while the user takes new data and provides correct answers. On the server you can take a basic model to recognize some data and then adjust with all the records you have in your database.
If you are interested to use this functions, please try the 9.6pr3 release or newer. This functionality is available on MacOS 10.15 or iOS 13. Calculation happens on device using GPU if available.
Recently we had the issue that we would like to allow users to sort data in FileMaker without using the sort dialog. In the user interface we have buttons to click for the user to sort table by one of the fields. You can think about a button bar with the field names where it makes sense to sort by.
The button calls a script and passes the field name as parameter. As FileMaker doesn't allow you to script the sort command manually, we need to generate a script with a lot of combinations. Today we want to show you a sample database for generating sort scripts automatically. (more)
For the last 20 years I have been a frequent user of the little file transfer application called Fetch from Fetch Softworks.
My first order for a license is from 2001. Later one in 2009 and as a gratitude I just ordered new licenses for the company. Continued development should be honored, even if developers don't force you to pay.
With the new version 5.8 they moved to a 64-bit architecture for compatibility with macOS 10.15 Catalina and added support for Dark Mode on macOS 10.14 Mojave and later. More in the release notes here.
This is great news as this is one of the applications we waited for to support 64-bit before using macOS Catalina (next year).
PS: I also use transmit sometimes, another great app where I also have a license.
We import using our FileDialog functions to select multiple documents. With DynaPDF functions we read metadata, create a first page preview picture and extract the text for the whole document. Now we can search to find the document we need. But when we also split the documents and store each page in a record, we can later find exactly the pages matching the search string. And for the preview picture we dynamically create a picture with highlighting the search term.
The year 2019 will end in less than three weeks. Do you need some more licenses?
You can order licenses for 2020 or later and have invoice, delivery and payment done in 2019. This way you secure the current pricing and the possibility to keep upgradeability for older licenses.
And of course you can order updates for several years in advance for all your MBS products.
As all our Xojo and DynaPDF plugin licenses are per developer, you should check if you got a new developer in your team this year and adjust licenses to match team size.
For MBS FileMaker Plugin please check if you have enough license for the number of seats or servers you have in use. If you upgrade to unlimited seats or servers, the plugin won't need to check the usage counts.
Especially if you run on a budget and you want to spend some money in the old year, you can buy updates for several years in advance.
If you need help to decide what Xojo, FileMaker or plugin license you need, we may be able to assist you.
Alternative you can use JS.EvaluateToString function which converts the result to text. If something goes wrong you may get an error message, so it may be good to check for an error with our IsError function.
Now if your database runs on a Mac and MBS FileMaker Plugin is installed, you can use the syntax coloring of our plugin to format the formula, e.g. like this script:
If [ MBS( "IsMacOS" ) = 1 ] Set Variable [ $r ; Value: MBS( "SyntaxColoring.Format"; EvaluateTest::Expression; 0 ) ]
Set Field [ EvaluateTest::Expression ; $r ] End If
The check For MacOS is to make sure we call it on MacOS and to check if the plugin is installed at all. If the plugin is missing, this will fail as a condition and then the format function is not called. The SyntaxColoring.Format function uses the syntax coloring definitions the plugin uses for formatting the expressions in the calculation dialog and you can change those. See fmSyntaxColorizer or other databases which provide an interface on the MBS Plugin function SyntaxColoring.AddTag to register those rules.
To check for errors you may want to use EvaluationError on the result of Evaluate function. But in the expression you may want to have a Let wrapped in an If(false; ...) expression. The If makes sure the code will go through the parser for the syntax check, but not actually run. The Let with the expression makes sure we wrap your expression properly and you don't mess with the If. In case there are comments in the expression, the ¶ will block any // comment causing an error.
Here we test the If/Let evaluate combination:
Finally we put all in a script to run when expression field is saved and we put the error number into a field in our script:
Set Error Capture [ On ] Set Variable [ $expression ; Value: "If(false; Let(r=" & EvaluateTest::Expression & "¶;0))" ]
Set Variable [ $e ; Value: EvaluationError(Evaluate($expression)) ]
Set Field [ EvaluateTest::Error ; $e ]
Today at the Heise MacDev, a Mac & iOS developer conference organized by Heise publisher.
In the last ten years I visited Macoun a couple of times. Now we may end up having two conferences in Germany for Mac & iOS developers. Let's learn new techniques, meet local developers and get new contacts.
The script to save is quite easy as it just asks canvas to save its content as base64 encoded png image into the hidden text area. Then uses WebView.GetFormTextAreaValue to query this value, cuts out the header and decodes the base64 image:
Set Variable [ $dataURL ; Value: MBS( "WebView.GetFormTextAreaValue" ; "web"; "formtest"; "output"; 0 ) ]
Set Variable [ $p ; Value: Position($DataURL; ","; 1; 1) ] If [ $p > 0 ] Set Variable [ $data ; Value: Middle($dataURL; $p + 1; Length($dataURL)) ]
Set Field [ Signature Field::Data ; Base64Decode ( $data; "signature.png" ) ] End If
We hope you like this example: SignatureField.zip. We'll include it in future plugin releases as an example.
Our Black Friday & Cyber Monday sale continues till Tuesday evening:
First use coupon code BlackFridayMBS for our web shop to order new licenses with a 20% discount. Works for both FileMaker and Xojo plugin licenses.
If you have special needs, you can email us to get an invoice or Paypal payment link directly. We know some people need to wait till next week to order, so the offer is valid till Tuesday.
Second if you have purchased previously an individual MBS Xojo Plugin part from the Complete Set within the last two years, but not the whole set, we offer you an upgrade to the Complete set for the update price. Please consider to get the whole collection of 35 plugins instead of just one plugin.
Customers send support requests, purchase licenses or use our web forms, but later some complain we never answered.
Please check if you may have met one of this conditions:
Check if you typed your email address correctly. Copy & Paste the email used and send a test email there. Maybe you missed a letter or swapped a few and don't see it yourself.
Check your spam folder for an answer. Sometimes our emails end up in spam folder.
Contact us with another email address. If your email server blocks us, we can't easily reach you. A second email address may be handy for us to contact you.
Check if you can white list our email address for your mail server.
Check if your mailbox on the server is not full. Moving a few emails in your mail app from inbox into a local archive folder may free up space on the server.
Send your email again after two days. Sometimes an email just gets lost.
It is sometimes scary how angry people can get if they don't get an answer in time. Sometimes we need to lookup a phone number and call clients to inform them their email is broken.
As usual, this just works fine for 99% of all emails.