Troi Grabber Plug-in FMP6 conversion note
Grabber Plug-in 2.x is FileMaker 7 native
Troi Grabber Plug-in 2.0 was the first version to use the
FileMaker 7 syntax or API (Application Program Interface) to do its work.
NOTE 2 Below we will discuss Troi Grabber Plug-in 2.0, but this also applies to possible future versions with a higher number, like for example version 2.3.
To make use of the new API you have to make sure the calls to the plug-in are done the right way. Below are some considerations when converting to Troi Grabber Plug-in 2.x.
New function syntax
The plug-in functions have a different syntax compared to the FileMaker Pro 6 plug-in.
For example the Grab-StartPreview function has this syntax in the classic API:
External("Grab-StartPreview", "left|top|width|height|switches" )
The syntax in the new native API looks like this:
Grab_StartPreview( switches ; technologyName; previewBounds )
Note that functions look like a real function call, no
longer a call to External(). Also a hyphen "-" is no longer
allowed, so the hyphens have changed to underscores "_"
instead. Note too that parameters don't have to be
concatenated with a separator. Instead use a semicolon ";"
to separate the parameters. For future enhancements we have
added a new first parameter: switches. We also added a technology parameter.
Set Field [errorCode ,
TIP Function names are no longer case sensitive and will change to the correct case after you close the "Specify Calculation" dialog box.
Multiple parameters and new switches
As seen from the syntax, plug-in functions now can have multiple parameters. To make this plug-in more consistent, most functions now have a switches parameter as the first parameter. This makes enhancing the plug-in in the future easier.
TIP Switches are not case sensitive.
Omitting optional parameters
It is now possible to have optional parameters, although Grabber Plug-in currently does not have a function that allows optional parameters. But in general, when you omit an optional parameter be sure to add an extra semicolon after the last one, otherwise FileMaker will show an alert that there are too few parameters in this function. For example, taken from our File Plug-in, below we omitted the 3rd parameter at the end (initialfolder). This is the correct way to do this:
Set Field [theFile,
New parameter limits
The plug-in functions now have a size limit of 1 Gb per parameter (up from the total of 64000 character limit for all parameters in FileMaker 6). The Troi Grabber Plug-in 2.0 can handle those bigger parameters, however, displaying the results in FileMaker 7 (or later) can take a long time.
Converting the function call from FileMaker 6
When converting FileMaker does not change the plug-in call. So after conversion you need to do this manually. Here are the global steps:
Let's for example take this Grabber Plug-in 1.5 call:
External("Grab-GetTimecode", "-Unused " & "|" & FileSpec )
This needs to be changed to this Grabber Plug-in 2.0 call:
Grab_GetTimecode( "-Unused" ; gMoviefilePath)
TIP Just copy script or steps from the example files, they are all in the Grabber Plug-in 2.0 format!
Specific functions notes
The table below will help you figure out the new names for changed function names:
The table below lists conversion issues with specific functions: