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.

Slow Loading of SelectFile module

Featured Replies

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

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?

  • Author

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

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.

  • Author

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

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.

Create an account or sign in to comment

Important Information

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

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.