Skip to main content

Activator HTTP Server setup instructions

By April 23, 2019May 13th, 2019Additional info

Troi Activator Plug-in has a built-in HTTP server, which will trigger a script when data arrives. The HTTP server can be started with the Actr_StartHTTPServer function or the Start HTTP Server script step. You stop the server with the Actr_StopHTTPServer function or the Stop HTTP Server script step.

There are several ways in which you can use this functionality:

  • use the plug-in as an (Image) Upload Server. This functionality is explained in the separate post Image Upload Server setup instructions.
  • trigger a script via a URL. This functionality is explained below.

Script triggering via a URL

With Troi Activator Plug-in you can trigger a script with a URL, using the HTTP GET method. Use a URL like this:
http://www.example.com:54242/triggerscript.html?yourText=someText
You can specify an (optional) password like this:
http://www.example.com:54242/triggerscript.html?yourText=showtime&password=secret
You can also add waitForResponse=yes to the triggerscript.html URL, for example like this:
http://www.example.com:54242/triggerscript.html?waitForResponse=yes&yourText=getdatalist
In the triggered script you can then specify the response text with the Actr_SetHTTPResponse function or Set HTTP Response script step. This sets the (HTML) text which is returned to the remote client in response to the HTTP URL request sent to the Activator Web Server.

Test it locally

  • If you have not done this, install Troi Activator Plug-in 5.0 first.
  • Open the FileMaker example file HTTPResponse.fmp12 example file (which can be found in the download).

click the image to enlarge

  • Start the HTTP Server, by clicking on the button “Start HTTP Server”.
  • Click the link under the heading ‘Test it locally’
  • Alternatively you can enter this URL in your web browser: http://<IP address>:54242/trigger.html either on the same or a different computer on the network.
  • You should now see a web page where you can test sending text to the HTTP server:

click the image to enlarge

After you enter some text and click on the “Send the text” button you should get a response, similar to this:

click the image to enlarge

The triggered script in the example sends only a simple HTML response. You can modify the response to any (HTML formatted) text from your FileMaker Pro database, for example with text from a specific record.

Back to main Activator Plug-in page