Script Editor

The script editor window allows you to create, open, edit, compile, print and save a VB script.

The scripts used for definition of the splitting criteria should return the values in the form of special string variable RRV. This variable value has the following structure:

Name=value&chr(10)&name=value&chr(10)&name=value&...

where name and value are the name and the value of some variable, chr(10) is the EOL character for VBScript.

The variable values cannot contain EOL characters.

Two special variables can be used in RRV:

  1. Split: this variable gets the value that instructs the component whether the document should be split on the current page. The variants of this variable are as follows:
    • RRV = "Split=BEFORE": the component will split the document on the current page and this page will be the first page of the next document. This is equivalent to using the Pre separator option on the General tab when either a wildcard or a regular expression is used.
    • RRV = "Split=REMOVE": the component will split the document on the current page and delete the current page. This is equivalent to the situation when the Keep barcode page check box on the General tab is cleared.
    • RRV="Split=AFTER": the component will split the document on the current page and this page will be the last page of the current document. This is equivalent to the situation when the Keep barcode page option is ON and the Pre separator option is OFF.
    • If the Split variable has any other value, the component will not split the document on the current page.
  2. OutputPages: this variable gets the value that instructs the component how to create the output documents that contain the specified pages of the original document. The value of this variable should have the following structure: pages(i);...;pages(n), where pages(i) is a comma-separated list of original document page numbers that will form the i-th output document; for example, 1,4,2. You can also use ranges of pages; for example, 1..5 means pages from 1 to 5 of the original document.

    Example of this variable usage:

    RRV = "OutputPages=1,2,3;5,2;1..3" This means that the component should create three documents. The first document will contain 3 pages (1st, 2nd and 3rd pages of the original document). The second document will contain 2 pages (5th and 2nd pages of the original document). The third document will contain pages 1,2,3 of the original document.

The variables listed in the RRV structure may be used by other scripts. For this purpose, you should add them to the list of variables of those scripts as global variables. The script may change the value of the global variable that has been already initialized by returning its value in the RRV list.

The component verifies the value of the OutputPages variable after processing all pages of the document and after executing all other scripts.

See the Script examples of the VB script usage.