You may know already that MBS Plugin enhances the script editor on Mac with line numbers, script step colors, calculation colors and if enabled variable declaration check.
Now with version 5.0 we have some more enhancements. If you have a typo in your function name, you get a message. So the call MBS("ersio") returns now "[MBS] Unknown function: ersio. Did you mean Version?". Our plugin simply scans internal function list to find a function name which matches best to the given function name. You can of course use similar best match search for your own solutions with the List.BestMatch and QuickList.BestMatch functions.
Next you can get notifications for script errors. Run Trace.EnableErrorNotifications function once to enable this feature on your Mac. Whenever a script error happens, you'll see this notification showing the error message and the function name:
Be sure to disable it when going into production so your users don't see the notifications. You should check in your scripts for errors and handle them gracefully.
Please also use Trace functions. The Trace function will make sure that for every function call to the plugin, you get a log entry with parameters and result. For version 5.0 we added logging of script triggers. Trace can either log to a file or to the system debug log. So pass a native path, e.g. on Mac "/tmp/test.txt". Or simply use Console.app on Mac or install DebugView app on Windows. DebugView on Windows can be run as administrator and enabled to capture global Win32 in order to see log messages from FileMaker server. Below a sample script to decide how to log for various cases:
As you see we use two log files for Mac server, depending if the plugin is loaded for web direct or normal server.
A common problem we see with people is wrong registration. When you work with clients and servers, it can get confusing. While the plugin allows you to use a runtime or server license for one seat to develop, please don't use a server or runtime license regularly for clients. A registration script can go like this:
Set Variable [$r; Value:Evaluate("MBS(\"Register\"; " & MBSPlugin::LicenseKeyRuntime & ")")]
Set Variable [$r; Value:Evaluate("MBS(\"Register\"; " & MBSPlugin::LicenseKeyClient & ")")]
So first we exit early for iOS as there is no plugin for iOS. Than we check if plugin is registered already and do nothing in that case. Else we check the platform and use the appropriated registration key. In our case with Evaluate as the registration key is in a text field.
Using isRegistered function is better than a global variable and certainly it is better to call such a script from various places where you need the plugin to make sure you are registered. With FileMaker Server the script engine may crash and restart. In that case the plugin is loaded again and registration needs to be applied again.
Or you use our StoreRegistration function and save the registration to preferences file (Mac) or registry (Windows).
Update: For FileMaker Server on Mac OS X you can see messages in /Library/FileMaker Server/Logs/stderr file.
Nickenich, Germany - (February 24th, 2015) -- MonkeyBread Software today is pleased to announce MBS FileMaker Plugin 5.0 for Mac OS X or Windows, the latest update to their product that is easily the most powerful plugin currently available for FileMaker Pro. As the leading database management solution for Windows, Mac, and the web, the FileMaker Pro Integrated Development Environment supports a plugin architecture that can easily extend the feature set of the application. MBS FileMaker Plugin 5.0 has been updated and now includes over 3000 different functions, and the versatile plugin has gained more new functions:
For our Mac users we have now hot keys. You can define a key combination to launch a FileMaker script, even if FileMaker is not the active application. Our MountNotification functions allow you to run a script when a drive mounts or unmounts.
The MBS Plugin now helps finding errors in scripts. If you call the MBS function with an unknown function name, the error message now includes a suggestion for the right function name. We hope this helps finding typos. If a script runs and a function returns an error, the plugin will show a notification. This way you don't miss an error in your scripts. Please enable this feature for development using Trace.EnableErrorNotifications.
For DynaPDF we have new functions to create, modify and delete annotations. You can now create much easier preview images for pages and render whole PDF files to a folder of images. New functions allow to place text as watermark across a page.
The barcode functions can now calculate checksums for EAN and ISBN. The function Files.DiskInfo queries the size of a drive and the free space. We improved the TAPI functions for Windows to make and receive phone calls.
For webviewer we got a few new functions to query selected text, formatted text and the favorite icon. You can control the scrollbars and manage cookies. Finally we got a new example showing how to use a SVG drawing tool in FileMaker.
We updated a couple of libraries: DynaPDF updated to version 126.96.36.199, LibXL to 3.6.1, CURL to 7.39.0, GraphicsMagick to 1.3.20, libJPEG to 9.1, libPNG to 1.6.14, OpenSSL to 1.0.1j and PCRE to 8.36.
Method Draw is a fork of SVG Edit, a web based SVG editor. And we just got it working in FileMaker:
As you see we have script to initialize, load and save. So you can have a full featured drawing area in your FileMaker solution. Works fine here with FileMaker 11 on Mac, 13 on Mac and 13 on Windows. Other versions need to be tested.
Will be included as example with upcoming plugin release.
PS: We have also an example for Xojo to do similar.
10th February 2015 - Monkeybread Software develops for years the MBS FileMaker Plugin. The current development version 5.0pr10 includes now over 3000 functions, a new record!
Shortly we release our Version 5.0. New in this version are global hotkeys for Mac and a lot of improvements for TAPI, WebView, DynaPDF, Barcode, GraphicsMagick, Excel, ListDialog, Audit and SystemInfo functions. Our Menubar functions allow you to run FileMaker menu commands by script. Using FM.RunDataDesignReport function you can even automate generating a database design report. If you have a typing mismatch in a function name our plugin will now suggest a correction. And if some error happens in a script, the plugin can show a notification on OS X with the error message, so you notice script problems easier.
Many FileMaker developers trust the MBS Plugin. Normally new developers find the MBS Plugin due to an interesting function. Often while researching for a client if a possible feature can be added to a solution in FileMaker. Once the developer knows how powerful our plugins is, they enjoy using it and find new functions regularly.
The development of MBS Plugin startet 2006 with early versions. Soon in 2010 we had version 2.0 with over 400 functions. End of 2012 we published version 3.0 with already 1375 functions. Early 2014 with version 4.0 we got 2298 functions. In the last year alone we added over 700 functions for you. No wonder, as we have a constant stream of feature requests coming in from our plugin users.
Especially our free extras like the line numbers and syntax highlighting in script editor brought us a lot of new clients in the last two years.
First when you plan to use the XL functions, be aware that you will need the license for our MBS plugin. In addition you need licenses for the LibXL library. Our plugin uses this library to actually perform the functions. LibXL is sold separately for $199 per platform and you only buy one license for you as the developer, independent of the number of clients.
Before using the XL functions, it is important to initialize the XL functions. Best practice is to check result of MBS("XL.IsInitialized") function. If result is not 1, you need to initialize. For that you first need to locate the libxl files. Our examples include library files for Mac and Windows. We have libxl.dylib on Mac for 32 and 64 bit in one file. For Windows libxl.dll is the 32bit and libxl64.dll is the 64bit file. On Windows you can pass path to libxl.dll and if FileMaker is running as 64bit application, the plugin will add the 64 automatically and find the 64bit library. The example databases find the library in the same folder as the example database automatically. On a Server you normally copy the libxl files to the server and hard code the native path, e.g. "/Libary/FileMaker Server/libxl.dylib". So the initialization can look like this:
Next we have to create a new book. The plugin uses reference numbers to handle several books in memory at the same time. It is important you reference your book with a variable in the whole script and release it on the end. To create a workbook, please call XL.NewBook function. Here you need to decide if you plan to save later as XML based or binary excel file. We pass 0 for the normal xls file format:
Set Variable [$book; Value:MBS( "XL.NewBook"; 0 )]
After we got our book, we add a sheet labeled "Addresses". We get back the sheet reference number which is zero for first sheet:
Our main loop here loops over the records in our test table. Starting with first record we move one row at a time and one record a time. Inside the loop we set cell text for each cell in current row and fill them with values from the record. As you see we have to pass book reference number, sheet number, row number and column indexes. We define the columns ourself here.
Go to Record/Request/Page [First]
Set Variable [$r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 0; Export records::First Name)]
Set Variable [$r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 1; Export records::Last Name)]
Set Variable [$r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 2; Export records::Street)]
Set Variable [$r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 3; Export records::Zip)]
Set Variable [$r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 4; Export records::City)]
Set Variable [$r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 5; Export records::Country)]
Set Variable [$r; Value:MBS( "XL.Sheet.CellWriteText"; $book; $sheet; $row; 6; Export records::Phone)]
Go to Record/Request/Page [Next; Exit after last]
Set Variable [$row; Value:$row + 1]
On the end, we save to a container. For that we use the Set Field script step. the plugin function XL.Book.Save returns the container value with the Excel file inside. We pass a file name for the container to give it a name which FileMaker uses to export the field content later.
Set Field [Export records::File; MBS("XL.Book.Save"; $book; "test.xls")]
Finally we have to release memory and close book. So the XL.Book.Release will clear memory:
This is of course a very easy example. It does not create fonts or formats. Maybe you want to check other example databases coming with plugin if you like to learn how to create formats, fonts and add images to Excel files.
As all those social services (Facebook, Twitter, Google Plus) like to know where users surf. All the websites with like buttons create a log entry in their logs and include a reference to the profile, if you are logged in. This way they can track you surfing over the web.
One thing I do myself for a long time is to delete cookies automatically. With Cookies app from Russell Gray. I have 20 cookies on my white list like the Xojo and FileMaker forums auto login. But all others cookies are automatically deleted when I close the browser. This way I'm a new client each time when I visit google web search or browse amazon.
Now I have several browsers: Safari, Firefox and Google Chrome. For my normal surfing I use Safari while the social networks reside in Chrome. They can set their cookies and I have auto login, but they don't monitor me when I use Safari to surf the web.
Finally I disabled plugins. No flash security problems if Flash is disabled. And as YouTube now uses HTML5 by default, that's not even a problem for normal surfing. And of course plugins are just a few clicks away if needed. But with new plugin per website control in modern browsers, you should have plugins disabled for all websites by default. Only enable them where you need. It is amazing how many websites want to use Flash only to track you!
We just got notice about the upcoming dotfmp conference where you can meet me:
Berlin, Germany - 6 February 2015
We are pleased to announce the 3rd edition of THE pan-European Unconference for FileMaker Developer, .fmp[x]Berlin 2015.
Taking place from 4 − 6 June 2015 in the Hotel Upstalsboom Berlin, some of the finest brains of the European Software-Developer community will be meeting on a personal basis to exchange ideas and share knowledge.
This high-level content, all about the latest versions of the FileMaker Platform, will be accompanied by some special features that are not available elsewhere!
In terms of award-giving, unconference regulars will be pleased to know that the omnipresent 'dotfmp award for the longest journey’ will be better than ever. This not-to-be-taken-too-seriously event will continue to offer prizes and merriment. It will be joined by the "dotfmp Certification Exam for FileMaker Pro 2”, a nostalgic trip harking back to the beginning of software development. And, last but not least, the "Developer Passport” will honour the efforts of the most-dedicated developers in a very different way!
All this is framed by a very special supporting program. Starting on Wednesday 3rd, there will be the chance to hangout in one of the oldest beer gardens in Berlin. Delegates will be able to visit specialty restaurants on Friday 5th and to enjoy a Thuringian Barbecue on Saturday 6th. Closing, on Sunday, 7th is left free for sight-seeing to the many famous sights places and sights in Berlin.
.fmp[x]Berlin has been growing by 25% each year and has become an inherent part of the yearly schedule of the most important developers across the world. As such, this is the first time we have to limit the seats to a maximum of 80 attendees. In order to secure a place at this high-level event in one of the most exciting cities, register on the website now!
Aktuelles Thema: Anbindung der Telefonanlage an das hausinterne FileMaker System
Eigene Ideen, Konzepte oder gar Lösungen beleben lockeren Erfahrungsaustausch und erquickendes Fachsimpeln. Genießen Sie den Abend und machen Sie mit! Bitte benutzen Sie den vorderen Eingang. Gerne kommt der Stammtisch auch zu Ihnen und Ihrer FileMaker Entwicklung :)
Fragen sowie Anregungen einfach an email@example.com senden. Freunde und Kollegen sind wie immer gern gesehen und werden auf Wunsch in den Verteiler aufgenommen.