![]() |
Trigger Serial Test Script |
Use this script step to troubleshoot the serial port and test scripting.
Syntax
Trigger Serial Test Script [ Select ; Result (error) ; Test data to send ]
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 |
Test data to send | either "Default test text" or "All bytes 0 to 255" |
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:
$$-28 | notOpenErr | make sure you have opened a port and specified a trigger script |
Other errors may be returned.
Originated in
Troi Serial Plug-in 5.0
Compatibility
FileMaker Pro 18 to FileMaker Pro 2025
Considerations
To be able to test the trigger script the serial port must be opened and a trigger script must be specified.
See the Debug.fmp12 example file.
NOTE The wait time before the the script is triggered is 5 seconds.
NOTE: You might need to enable “Validate cross-file plug-in access” extended privilege (fmplugin extended privilege) in newly created fmp12 files, for script triggering to work.
See our web page for more info on how to do this:
Trigger scripts in new fmp12 files: enable “Validate cross-file plug-in access” extended privilege
New in v9.0: the plug-in now shows an alert dialog when script triggering fails because of insufficient privilege for triggering scripts.
Example
Trigger Serial Test Script [ Select ; $ErrorCode ;
Default test text ]
This will trigger the dispatch script after 5 seconds, with default text.
You can also give this command:
Trigger Serial Test Script [ Select ; $ErrorCode ;
All bytes 0 to 255 ]
This will trigger the trigger script after 5 seconds, the data received is a string with all bytes from 0 to 255.
Used in example file
Debug.fmp12
Related script step
Beep for Serial Data |
Related function
Serial_Debug |
Related topics
Troi Serial Plug-in online help (overview)