With Troi File Plug-in you can easily let a user select a file on disk, for example to get the contents into filemaker. With the plug-in you can also move or rename it, to indicate the file has been handled.
Selecting the file
Use the TrFile_SelectFileDialog function to open up a dialog which lets the user select a file. By default all the files can be selected. If you want the user to be able to select only files with a certain extension use the TrFile_SetDefaultType function first.
To let the user select any file add these script steps to a ScriptMaker script:
Set Variable [$DontCare; TrFile_SetDefaultType( "-Unused"; "")] Set Variable [$FilePath; TrFile_SelectFileDialog( "-Unused" ; "Please select a file.") ]
This will return the path to the file for example:
Rob Salusbury wrote to us that he is using our Troi URL plug-in to make FileMaker Pro into an incredibly powerful web client, in particular for communicating with SQL databases.
He thinks we are sitting on a real game changer that potential customers might not be aware of. Combined with Troi File and Troi Encryptor it delivers the ability to create very fast (VERY fast), very secure SQL applications that provide a ton of extended capabilities over any browser-only based solutions.
You can find the quote on our comments page.
The link below points to a page on his site that explains a little more about the concept.
We have to admit we don’t completely understand how this works, so you’ll have to quiz him on the details. We are amazed what our users can accomplish with the help of our plug-ins.
Many more functions
This is just one of the functionalities added by the Troi URL Plug-in. Another possibility is for example to send tweets to Twitter.
On the Troi URL Plug-in page you can download a fully functional demo with all the functions explained:
It is a great and easy way to enhance your database for you or your customers.
With the recently released Troi Dialog Plug-in 6 for FileMaker Pro you can create very powerful Input Dialogs in a few script steps.
Below we show how to display an input dialog with a popup, which displays the values of a second value list, while returning the chosen value from the first list.
This (simplified) example uses fixed text to build the dialog, normally you would fill the dialog with data from your database. In ScriptMaker you need to add script steps to a script, but you can of course copy the script from the example files in the download of Troi Dialog Plug-in.
Implementing the InputDialog
First set the values for the popup. For this popup we fill the optional last parameter, which holds a second value list (with item names).
We just released Troi Dialog Plug-in 6.0, our plug-in for displaying flexible, dynamic dialogs in FileMaker Pro 13. This release adds several new features, such as the possibility to show items from a second value list in a pop-up while returning the value from the first, the possibility to choose multiple items from a list dialog and the use of several keyboard shortcuts in the edit fields of the InputDialog and BigInputDialog.
Download a demo here: https://www.troi.com/software/dialogplugin.html
Did you know that with Troi File Plug-in you can easily see which files or folders are in a folder?
You can get this list easily into FileMaker Pro with the TrFile_ListFolder( ) function. In ScriptMaker add this script step to a script:
Set Field [ result, TrFile_ListFolder( “-Files -Folders” ; “Mac HD:”) ]
This will return a text list of all files and folders on the hard disk “Mac HD”. The two switches -Files and -Folders indicate you want both types returned. This might return for example this:
and so on…
In this post you find the older release notes for Troi File Plug-in for FileMaker Pro.
Version 8.6.1 (for FileMaker 12 to 15) (January 20, 2017)
- (Windows) Improved the handling of certain ZIP files with the TrFile_UnZIP function: the plug-in will now implicitly create a folder when items in the ZIP file are in a subfolder, but that subfolder itself is not present.
- Improved TrFile_MetaData( “-GetPDFDescription”): the plug-in can now better parse newer PDF versions, like PDF 1.7. And if there is a parsing error the plug-in returns the partial data.
- (Mac OS X) Improved TrFile_MetaData( “-GetMovieDescription”): when a movie contains a Timecode track, the Timecode at the beginning and end of the movie and the Timecode of the current frame is returned again as part of the description.
- Improved the multi-threading behavior of the TrFile_Metadata function. Multiple running scripts on FileMaker Server at the same time will now work better.
- Improved the multi-threading behavior of the TrFile_Substitute function. Multiple running scripts on FileMaker Server at the same time will now work better.
- Fixed a memory leak in the TrFile_Substitute function.
- Fixed a bug in the TrFile_SetContents and TrFile_AppendContents functions where extra spurious characters could be written. This could happen when a text which contained combining unicode characters (for example a combining diaeresis, combining to ä) was written to a file using encoding: -Encoding=ASCII_Windows.
- (Mac OS X) Improved stopping of the drag and drop handling and removed a potential memory leak.
- (Mac OS X) Fixed a potential crash in the TrFile_DragAndDrop function, when restarting drag and drop multiple times.
- (Windows) Added an exception handler, which handles (fatal) exceptions in the plug-in. It will save information on the exception to a dump file in the Temp directory. The dump file will be named similar to this:
“Crashdump Troi File Plug-In v8.6.1-20161231-212603-5488-3164.dmp”.
When running FileMaker Server the plug-in also writes the exception in the “Troi Plugin FMServer.log”:
- 2017-01-01 21:26:03 [Troi File Plug-In] Exception raised. code = -1073741819
- 2017-01-01 21:26:03 [Troi File Plug-In] Created crash dumpfile:
C:\Users\user\AppData\Local\Temp\Crashdump Troi File Plug-In v8.6.1-20170101-212603.dmp
- 2017-01-01 21:26:03 [Troi File Plug-In] **** FATAL ERROR: EXIT PROCESS ****
- (Mac OS X) Improved export of symbols: now only the symbols that are required are exported by the plug-in.
- Improved the internal registration of function calls of the plug-ins, making it more robust on more platforms.
In this post you find the older release notes for Troi Text Plug-in for FileMaker Pro.
Version 3.0.1 for FileMaker Pro 7, 8 and 8.5 (October 12th, 2006)
- The Getline function: now better supports styled text.
- Fixed a small typo in FMP6 conversion note.