Difference between revisions of "Extern Tips"
From FM Plugin Wikipedia
(New page: The Extern header file contains the main/initial Callback Structure which is passed into your plug-in's entry point function, as well as several useful defines and enumerations. This head...) |
|||
Line 8: | Line 8: | ||
:*fileName - The file name of the database that contains the script you want to call. You do not need to include the file extension (".fp7") here, and in fact, any 1 to 4 character extension you define will be completely ignored. (eg. If you pass in "mydb.A" or "mydb.fake", FileMaker will choose "mydb.fp7" as the database.) | :*fileName - The file name of the database that contains the script you want to call. You do not need to include the file extension (".fp7") here, and in fact, any 1 to 4 character extension you define will be completely ignored. (eg. If you pass in "mydb.A" or "mydb.fake", FileMaker will choose "mydb.fp7" as the database.) | ||
:*scriptName - The name of the script you want to call. The script name is case-insensitive. | :*scriptName - The name of the script you want to call. The script name is case-insensitive. | ||
− | + | :*control - This parameter tells FileMaker what to do with the currently paused script once the script you are calling finishes. This has no bearing on the current script if it's actively running (not paused). In the Extern header file, there is an enumeration below the FMX_ScriptControl typedef that defines the values you can pass for this parameter. These values mean the exact same thing as the values you define when defining a button to Perform a Script. Note: FM7 behaves [[FM7 StartScript Control|differently]]. | |
− | .... | + | :*parameter - This is the script parameter to pass to the script. It can be any of the fundamental data types. Ref: [[Data Tips]] |
Revision as of 21:32, 28 January 2009
The Extern header file contains the main/initial Callback Structure which is passed into your plug-in's entry point function, as well as several useful defines and enumerations. This header also includes several callbacks and things for developing plug-ins using the older "External()" style interface. Those items will not be discussed here as they are not recommended.
Callback functions
There are 2 callback functions that are useful for developing FM7+ plug-ins:
- FMX_StartScript(fileName, scriptName, control, parameter)
- The StartScript function is what you use to call scripts in FileMaker from your plug-in. This function takes 4 parameters:
- fileName - The file name of the database that contains the script you want to call. You do not need to include the file extension (".fp7") here, and in fact, any 1 to 4 character extension you define will be completely ignored. (eg. If you pass in "mydb.A" or "mydb.fake", FileMaker will choose "mydb.fp7" as the database.)
- scriptName - The name of the script you want to call. The script name is case-insensitive.
- control - This parameter tells FileMaker what to do with the currently paused script once the script you are calling finishes. This has no bearing on the current script if it's actively running (not paused). In the Extern header file, there is an enumeration below the FMX_ScriptControl typedef that defines the values you can pass for this parameter. These values mean the exact same thing as the values you define when defining a button to Perform a Script. Note: FM7 behaves differently.
- parameter - This is the script parameter to pass to the script. It can be any of the fundamental data types. Ref: Data Tips