RemoteScripter
Table of Contents:
RemoteScripter
Overview
RemoteScripter allows you to remotely trigger FileMaker scripts on another computer.
- It can be triggered either by RemoteScripter running on a different computer, or by an HTTP URL.
- This plugin can safely be triggered from within the Web Publishing Engine,
which makes it an ideal way to trigger non-web-safe scripts on a separate script processing computer.
- For example, let's say that your WebDirect or IWP application needs to be able to generate downloadable PDFs. You would define a script called "Generate PDF" which is designed to be run on a computer running regular FileMaker Pro at IP address 10.0.0.25. It might look something like this:
Enter find mode
Set field Customer::customer ID to Get(ScriptParameter)
Perform find
Save as PDF
RemoteScripterSetResult("Success")
Now pick a random port number to run RemoteScripter on. We'll pick 4546, but it can be anything that does not conflict with another service running on the same port. You would have a startup script which calls:
RemoteScripterStart(4546, Get(FileName), "Generate PDF")
This tells RemoteScripter to trigger the Generate PDF script if it receives any requests on port 4546. On the computer running WebDirect, you would have a button that the user clicks on to see the PDF. This button triggers a script which would look something like this:
if( RemoteScripterTrigger("10.0.0.25", 4645, Customer::customer ID) = "Success" )
Go to Layout (Download PDF)
else
Go to Layout (Show PDF generation error)
end if
You could also trigger the PDF generation script directly from a user's browser, without going through the web server. Just have a URL that looks like this:
<a href="10.0.0.25:4645?35">View customer record 35</a>
This will trigger RemoteScripter to run the script and return whatever is set with RemoteScripterSetResult().
You can use RemoteScripter to trigger scripts on your clients machines when they click links in a web viewer in your FileMaker database. This allows you to design an interface in HTML, Java, Flash, or any language which can be displayed in your web viewer and then still trigger FileMaker scripting. You can accomplish this by installing the Remote Scripter plugin on each of your client machines. You can then call the RemoteScripterStart function like in the example above (a startup script is a good place for this) and trigger the script using a link in your HTML to http://localhost:4645
. The "localhost" url always points to the machine accessing it, so your users will trigger your script on their own machines when they click the link!
User Guide
See the 360Works RemoteScripter User Guide for a comprehensive list of all functions, their parameters, and their usage.
Nearly all documentation for 360Works RemoteScripter is contained in the User Guide, unlike some other products.
To Demo and Purchase
See the 360Works RemoteScripter page to download a demo of 360Works RemoteScripter, view pricing, or purchase it.
360Works Plugin Setup Guides
See Plugins_101 for Error reporting, installation, registration, and more.
Troubleshooting andCommon Issues
Listening Startup Script returns a 1 but no script is ever triggered
- Enable the fmplugin privilege in the extended privilege security settings