Categories

Script Editor

Script Engine is a feature designed to allow users to extend functionality, with this feature, users can use the efficient but simple javascript programming language to write and run their own script to implement their own business logic.


Script Parsing And Execution Module:
The main part of the script supporting. with this module, users can execute scripts to modify the content of database records or print-time variables when specified actions(events) occurred.

Events:
An event is a action that notify the software that something important has occurred.

On Element Value Changed event: is a event that occurred when any of the value changed on the print form dialog.

Scripts: The software supports two types of script: 'Automatically Triggered Script' and 'Manually Triggered Script'.
An 'Automatically Triggered Script' will be automatically triggered once the specified event occurred.
A 'Manually Triggered Script' will only triggered when users decided and manually selected the specified script and choose to run. And a list of 'Manually Triggered Script' and a 'run' button will be appeared on the window of the specified event.

Script Editor:
Enables users to manage all the scripts in the specified project. And also enables users to write their own script using javascript programming language, this feature has built-in a test run feature which helps users to debug their script.

Script Settings:
You can change the settings of the script in this section.(i.e. name, type...)

Parameters: A list of supported parameters(database fields or print-time variables) will be appeared on the listbox right side of the window. Parameters are pre-variables which reflect to the corresponding database fields or print-time variables.

For example: a database have a database fields called "Total_Number". and content of selected records of "Total_Number" is 100. after running the following script:


Total_Number=Total_Number+50;


the value of "Total_Number" will be changed to 150, and the corresponding content of database will be also changed from 100 to 150.

Script Editor: You can writing and editing your scripts in this textbox. the script language is javascript, for more information of javascript please visit the Guideline for JavaScript chapter

Test Run: This feature helps you to debug, finding error and check the result of output. The left side - Input Data is for you to input the test data. and after you entered test data and click "test run" button, the script will be executed and the output result will be displayed on the right side - output section. You can compare two section of data and check if the result is correct.