All of the functions you’ve seen can be programmed into a script that can be run at the click of an icon, or scheduled to run automatically using Windows Task Scheduler.

Scripting is a powerful and advanced FreeSight function that allows you to create “push-button” procedures that perform tasks in FreeSight automatically.

In combination with FreeSight’s other extensive capabilities, this enables you to completely automate data processing and reporting tasks that previously had taken hours or days. See our Customer Testimonials for some examples of this.

By illustration, suppose you have created a FreeSight file that you regularly use to produce a report. Each time you produce the report you need to repeat the same set of tasks. As follows:

  1. Open a FreeSight data set file;
  2. Use FreeSight’s Refresh command to refresh the file with new input data; (Behind the scenes, the new data will flow through the model and all processing and calculations will be completed automatically)
  3. Use FreeSight’s Export command to export the resulting analyses to Excel files;
  4. Save the FreeSight file;
  5. Exit FreeSight.

A script for the above sequence of operations might look like this:

A script is simply a list of commands telling FreeSight which operations are to be performed automatically.

This script lists the steps needed to:

  • open a FreeSight file,
  • refresh the input data using the appropriate refresh settings,
  • perform all necessary calculations and prepare two Microsoft Excel reports, and
  • save and close the FreeSight file.

This example shows how you can use a single script to generate any number of output reports. The example also shows that, while FreeSight can create a complete new Excel file from scratch, it can also directly merge new data into a pre-designed Excel template. Any formatting or formulas in the Excel template are retained, so you have complete flexibility on how the report looks and how the data is reported.

 
The actual scripting commands follow a syntax much like Windows Batch files. Using commands such as OPEN, IF, GOTO, CLOSE, REFRESH, EXPORT, etc. you can have the system perform from simple to complex operations for you.

Error checking and error reporting capabilities are available in the script each step of the way, so you can create robust, reliable processes.

Your script can check the success of every script command performed. If any problems are encountered when running the script – for instance, if an input file is missing – your script can detect this and take appropriate action. For example, the script could display a message to the user, write a message to an event log, or attempt to input a different file instead.

Optionally, you can have a progress window displayed during script execution.

This window displays a description of each step in the script as it is executed, and also will display messages if any problems are encountered.

Alternatively, you can choose to hide the progress window and FreeSight will run silently in the background. This is useful for FreeSight scripts which are run automatically on a timer, using Windows Task Scheduler.

In either case, the messages are also written to an event log, so afterward you can see exactly what scripts have been run, when they were run, and what their results were.

 
FreeSight scripting also supports parameter substitution using either input parameters or using Windows environment variables. This allows the flexibility to tailor the script to handle different input data names and locations, output file names, and so forth.

Complete details for scripting in FreeSight can be found in FreeSight Help located on our website, and also within the FreeSight program under Help on the menu bar.