Using post-processing scripts is a powerful way to take advantage of automating simple file manipulation. A post-processing script can be assigned to any report in STK (reports only, not available for graphs). The script is then triggered after the report is created in a 'temp' location, but before it is displayed/printed/saved/exported. Generally, the script is used to reformat this temp file. The post-processing script is called from a ‘system’ command that passes an argument, which is the path to the 'temp' file containing the original generated report, to the post-processing script. Any scripting or programming language can be used so long as is can be called directly form a system command (this is generally set as a file association), and accepts/reads the temp path as a command line argument. Upon script completion, the 'temp' file is then used to complete the selected operation (post-processing destination). The ability to use these post processing scripts is available with free STK - no add-on modules are needed. The post-processing scripts will generally be non-STK version dependent, but may require a custom report style (*.rst)
- Custom Formatting - From minor tweeks - such as creating a custom datetime format to completely rewriting the report such as merging sections of a custom Lighting Times report.
What you can't do:
- External Actions/Events - Automatically email the report upon creation.
- Connect back to STK (CONNECT or STKObjectModel) - the report creation holds the process, and needs to complete prior to returning control back to STK
- The attached zip file contains several examples, each with a 'readme' file describing it's use. The .\samples\pps_simple contains examples written in multiple scripting languages: Perl, Python, VBSscript, and Window's batch file. Currently, the other examples are all written in Perl, but I have also provided compiled executables that can be used. Where needed, custom report files are included.