Execute() Example
Example showing how to use Execute function to call external programs.
This example contains two files:
run_primer.js – this is the file that the user runs. From either D3PLOT or T-HIS. It’s purpose is to fire up PRIMER in batch mode and run a JavaScript.
primer_script.js – this is the script that PRIMER will run, when opened in batch mode by the above.
Execute (new) is better than System (old) for calling external programs because it allows you to send information back to the original script via the standard output and standard error text streams. In this example the standard output is used to send a message from PRIMER back to the original script in D3PLOT/T-HIS.
To run this script you will need to update the path to primer_script.js file (within the run_primer.js script). You may also need to update the path to the PRIMER executable.
This script includes functionality from v15.