Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FMD7 sample plug ins- XMpl_StartScript

Featured Replies

  • Newbies

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

"the StartScript external function"

What and where is this?

  • Author
  • Newbies

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

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

  • Author
  • Newbies

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...

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...

Not elegant, but free and functional

P.S. One caveat:

Get(ActiveFieldName) doesn

  • 2 months later...
  • Newbies

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.