Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7364 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi-

I just received the Developer 7 version, and I was very pleased to see the StartScript external function.

It seemed like a good way to add trigger like functionality, but I am at a bit of a loss to figure out a way to pass any context with the script invocation.

It would seem to me that this function would be really good if you could also set up the script parameter when calling it.

For example, I have an interface database (no tables) that file references the tables in another database. I made a calculated field to invoke the script. Now when I change the field in the interface file, the script will run but it will use the current rec of the tables database, not the interface file.

If the function was StartScript(fileName, scriptName, scriptParameter) so that I could tell the script which record I wanted to process, then it would be easy.

So here is the question... any of you C gurus willing to whip up a plugin like this? Is there some technical reason that this isn't feasible?

FileMaker Version: Dev 7

Platform: Mac OS X Panther

Posted

"the StartScript external function"

What and where is this?

  • Newbies
Posted

It is a function in the MacExample plugin.

On the CD, not installed by default, I think

/Filemaker Developer 7/English Extras/Examples/FMExample/FMPlugInSDK/Example/MacExample.fmplugin

description is on p 61 of the Dev Guide; includes source code and what-not on disk, but that's beyond me

  • Newbies
Posted

It is just a matter of editing three lines and recompiling (if you have CodeWarrior...)

in FMPluginExample.cpp change the number of parameters for the StartScript function from 2 to 3

err = fmx::ExprEnv::RegisterExternalFunction(*pluginID, kXMpl_StartScript, *name, *prototype, 3, 3, regFunctionFlags, Do_XMpl_StartScript );

In FMPluginExample.strings modify the function description to

"FMPluginExample 105" = "XMpl_StartScript( filename; scriptname; parameter )";

In FMPluginFunctions.cpp change the call to FMX_StartScript to

errorResult = FMX_StartScript( &(dataVect.AtAsText(0)), &(dataVect.AtAsText(1)), kFMXT_Pause, &(dataVect.At(2)) );

FileMaker Version: Dev 7

Platform: Mac OS X Panther

  • Newbies
Posted

ppochet said:

(if you have CodeWarrior...)

ah, slight problem with that detail... frown.gif

Thanks for the solution, though... I was hoping it was something that easy to do.

  • 3 weeks later...
Posted

I'll be really glad if Mr. ppochet or another C++ guru can answer my questions because I didn't touch "C Programming" since 1990...

My skills are not as good but I really want to learn. :)

I do have "CodeWarrior 8.3" for Mac and I'll be please to help our friend "Hoke" with this simple plugin. Very good idea by the way !!

So I've make your modifications to the FMI sample and then I recompile the project. WOW ! The third parameter functionality is now implement in the plugin and it's working very fine. Except for a strange bug on FileMaker Pro Developer 7 for Mac(Panther).

With the modified plugin placed in the "Extensions" folder, I'm unable to start the new FileMaker "built-in Instant web publishing" sharing service... Even if the plugin is disable in the "Preferences" window, it's seems there a kind of conflict between these two(2) "plugins".

In the "Plugin ID" string into the C++ code, I disable the configuration dialog box since there is nothing to setup for this simple plugin.

And I've already try to change the "ressources Id" for this dialog box but the problem remains...

Is there a way to debug a plugin who runs into another "non-cocoa" application ??

Removing my buggy file from the extensions folder of FileMaker fix the "Instant web publishing" problem but then I can't use my new baby ! :(

  • 4 months later...
  • 2 months later...
  • Newbies
Posted

I want to add a plugin into FMpro7. I went to the Filemaker7 program folder but there isn't a system folder in there. I have done this in the past to FM6 with no problem.

This topic is 7364 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.