Send a message to the computer with this IP address. This message will trigger the specified script.
Actr_SendRemoteEvent( switches ; IP_address ; securityID ; fileName ; scriptName ; yourID ; usertext )
|IP_address||the IP address of the computer that must be triggered|
|securityID||(optional) an ID that must be equal to the securityID of the receiving computer|
|fileName||the name of the file that contains the script|
|scriptName||the name of the script|
|yourID||a free to use ID that you can supply to identify the event|
|usertext||a free to use text that you can supply for your own needs|
switches can be one of this:
|-DefaultPortnumber||use the default port number of the Activator (UDP port 54242)|
||use the specified portnumber|
additionally you can add:
|-DontGoToForeground||the script triggers without the plug-in first bringing FileMaker (or Runtime) to the foreground|
|-SilentEvent||do not trigger a script, just send the data|
Data type returned
If successful it returns 0.
If unsuccessful it returns an error code starting with $$ and the error code. Returned error codes can be:
|$$-50||paramErr||there was an error with the parameters|
|$$-4228||portnumber out of range: use 0 to 65535|
Other errors may be returned. See our OSErrrs database for explanations.
Activator Plug-in 1.2
FileMaker Pro 15 to 19
You can omit both portnumber switches. In this case the default portnumber 54242 is used.
The securityID makes listening for messages safer. No one can trigger a script on a remote computer, unless they know the securityID. If the sender sends a different securityID no triggering occurs. See “Actr-StartListener” for more information on SecurityID.
The maximum length of a remote message is 6000 characters. To accommodate the name of the script etc, this means that you should not send usertext that is longer than 5000 characters.
When you add the -SilentEvent switch, the receiver application won’t be notified, so you need to make sure the event data is retrieved, with the -FirstSilentEvent switch in the Actr-GetEventInfo function. Also don’t forget to delete this event.
The -DontGoToForeground switch adds the possibility to do background processing, for example with a FileMaker Runtime application. See the example in the Background Processing folder.
Set Field [ gErrorCode ; Actr_SendRemoteEvent ( "-DefaultPortnumber ; 192.168.1.1 ; secretword ; Filename.fmp12 ; Triggerscript1 ; 1234567 ; Hello there!" ) ]
We assume that in your FileMaker file the following fields are defined:
gIPAddress Global, text gSecurityID Global, text gYourID Global, text gYourText Global, text gErrorCode Global, text
gIPAddress and gSecurityID should contain the IP address resp. the SecurityID of the computer you want to trigger. gYourID and gYourText can be filled with the message you want to send to the other computer. Add the following script step:
Set Field [ gErrorCode ; Actr_SendRemoteEvent ( "-PortNumber =51000" ; gIPAddress ; gSecurityID ; "Remote.fmp12" ; "Triggerscript1" ; gYourID ; gYourText ) ]
This will trigger script “Triggerscript1” in database “Remote.fmp12” on the remote computer.
Related script step
|Send Remote Script Trigger|