Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I'm experimenting with the ScriptMaster SelectFile module so users can store links to documents within Filemaker; this works very well.

I'm registering the module using the third option suggested, which is to use a set variable step to execute the necessary registration code. However, when I do this, the database which runs the script on startup hangs, sometimes for up to 10 seconds before it responds again. Is there any way of speeding this up, or is that the necessary compilation time for the module?

FWIW, the database is hosted on a Filemaker 8.5 server running of a Windows Server 2003, and I'm running FMP Advanced 11.0v2 on a Windows 7 Professional PC (2.93GHz Intel Core2 Duo with 2GB RAM)

Thanks

Brian

Posted

The registration may take a second or two, but unless you have a very large module it shouldn't take 10 seconds to register.

What version of the plugin are you using?

Posted

I'm using the 360Works+ScriptMaster-4_02 zip archive downloaded on 16th Nov last.

I'm registering the SelectFile module with the following script:

set variable [$check; Value:SMGetRegisteredModules]

If [$check="?"]

  set field [PREFS:_gScriptmaster;"0"]

Else

  set field [PREFS::_gScriptmaster;"1"]

  set Variable[$result; Value:RegisterGroovy( "SelectFile" ; "import java.awt.*;¶

     import javax.swing.JOptionPane;¶

     ¶

     String title = "Example File Chooser";¶

     FileDialog dialog = new FileDialog(JOptionPane.getRootFrame(),title);¶

     dialog.show();¶

     if (dialog.getFile() != null) {¶

     return dialog.getDirectory() + dialog.getFile();¶

     } else {¶

     return 0;¶

     }" )]

  If [$result= "ERROR" or $result="?"]

     Set field [PREFS::_gScriptmaster;"0"]

  end if

end if

This is supposed to register the module if it can, and set the value to _gScriptMaster to 1 if it registered successfully, and 0 if it didn't register.

Thanks

Brian

Posted

I've done some testing on this and it looks like this module just takes a 5-10 seconds to register. I don't think there is anything you can do to speed it up.

Posted

Would turning the module into a plug-in with Scriptmaster Advanced, or hosting the Scriptmaster file on the server improve the loading time?

Thanks

Brian

Posted

Plugins don't need to register in the same way these modules do. I've tested this and loading a plugin which uses this module happens very, very quickly and (for me) didn't slow down my filemaker loading at all.

This is one of the benefits of generating a plugin vs registering modules, and may be a good option for you.

This topic is 5124 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.