brian rich Posted November 22, 2010 Posted November 22, 2010 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
Smef Posted November 22, 2010 Posted November 22, 2010 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?
brian rich Posted November 23, 2010 Author Posted November 23, 2010 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
Smef Posted November 23, 2010 Posted November 23, 2010 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.
brian rich Posted November 24, 2010 Author Posted November 24, 2010 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
Smef Posted November 24, 2010 Posted November 24, 2010 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now