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.

Featured Replies

Hi

I am trying to build an HTTP listener, so it would be possible to remotely trigger a filemaker script.

I was thinking in the direction of the ServerSocket class. However the methodg .accept(), enables this socket to start listening for incoming calls, but completely blocks FileMaker. I guess because the ScriptMaster script never finishes, this is completely according to the Java documentation which states:

Listens for a connection to be made to this socket and accepts it. The method blocks until a connection is made.

So... my question is: is there a way so we can make a scriptmaster script run in the background? Or is this not possible using ScriptMaster?

Edited by Guest

If you turn on instant web publishing, then you can remotely trigger scripts with pushbuttons. Even with IWP, you can remotely trigger scripts; since ScriptMaster is IWP-friendly, that will do the trick. At least on Windows, anything in the iwp directory is served, so if you just place an html file in that folder with a javascript to open the DB and fire the script, it will run without need to login. I was experimenting with this a day ago, and found I could even pass parameters by setting a field equal to the URL parameter before running the script. It worked great, as long as I posted to a dummy frame so browser didn't lose focus on successive POSTs.

Alternately on your Mac you can have PHP trigger an AppleScript to run an FM script, e.g. how iTunes can be controlled remotely. http://www.whatsmyip.org/itunesremote/

  • Author

Thanks for the reply, I don't completely understand how your technique works, but I will definitely take a look at this technique.

However I am just trying to learn some Java, and I thought this would be a nice thing to try. But I just discovered that 360 works has this feature already available as a plugin...

Anyway it is also a more general question. Is it possible to create a java "applet" that runs in the background using scriptmaster?

Andries, you are correct in your assumption that ScriptMaster functions do not run in the background.

This may not be the route you were looking for, however, we do have a plugin that does just what you're looking for. RemoteScripter

fseipel, is also correct in pointing out that a script can be executed in Web Publishing and triggered remotely. Using the XML publishing API or the PHP API

  • Author

Hi Valentin

thanks for your reply. Well I discovered the plugin when I was looking on the internet for "ScriptMaster" and "HTTP-listener". As I mentioned it is more to learn Java and ScriptMaster than I actually already has an application in mind that would need this. I downloaded the demo-version of the plugin and will give it a try.

I know you can remotely trigger a script using the php api on a server, however it is more that I wanted to create a listener on the client side. For example to trigger a script from a webviewer (which I can actually do with your plugin).

So if I understand well, with ScriptMaster I need to make sure that my code can run until the end.

Another question. I am getting into "OOP" and learning that it is better to organize your code into classes. However is this possible in ScriptMaster? Am I on the correct route if I think the solution lies in creating JAR files and loading them into ScriptMaster?

Andries, this is how I would do it if it were me (writing Java classes, packaging them into a jar file, and including that with ScriptMaster).

We do this internally for a lot of our in-house projects that use ScriptMaster. With ScriptMaster Advanced, it will bundle these jar files into the generated plugin, so it's completely self-contained.

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.