Send Remote Script Trigger |
Send a message to the computer with this IP address. This message will trigger the specified script.
Syntax
Send Remote Script Trigger [ Select ; Result (error) ; IP Address ;
Port number ; Security ID ; File name ;
Script name ; Your ID ; User text ]
Options
Select entire contents | replaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field |
Result (error) | an error code |
IP Address | the IP address of the computer that must be triggered |
Port number | (optional) use the specified portnumber, if you leave this empty the default portnumber of the Activator is used (TCP port 54242) |
Security ID | (optional) an ID that must be equal to the security ID of the receiving computer |
File name | the name of the file that contains the script |
Script name | the name of the script |
Your ID | a free to use ID that you can supply to identify the event |
User text | a free to use text that you can supply for your own needs |
Returned Result
Data type returned
Error code
Result
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.
Originated in
Activator Plug-in 4.5
Compatibility
FileMaker Pro 17 to 2023
Considerations
You can omit the portnumber option. In this case the default portnumber 54242 is used.
The security ID makes listening for messages safer. No one can trigger a script on a remote computer, unless they know the security ID. If the sender sends a different security ID no triggering occurs. See “Start Message Listener” for more information on security ID.
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 User text that is longer than 5000 characters.
Example
Send Remote Script Trigger [ Select ; gErrorCode ; "192.168.1.1" ; "secretword" ;
"Filename.fmp12" ; "Triggerscript1" ; "1234567" ; "Hello there!" ]
Example 2
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 security ID 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:
Send Remote Script Trigger [ Select ; gErrorCode ; Port number: 51000 ; gIPAddress ; gSecurityID ;
"Remote.fmp12" ; "Triggerscript1" ; gYourID ; gYourText ]
This will trigger script “Triggerscript1” in database “Remote.fmp12” on the remote computer.
Used in example file
RemoteTriggers.fmp12
Related script steps
Delete Script Trigger |
Start Message Listener |
Related function
Actr_SendRemoteEvent |
Related topics
Activator Plug-in online help (overview)