Open topic with navigation
Text, encoder, and barcode objects on a template can receive their data from a number of sources, including your keyboard, database or text files, and your computer's time and date functions. Sometimes, however, you may have special requirements, such as needing to read data from a file, process it, change it in some special way, and then perhaps combine it in an unusual manner with some other data. By offering the power of Microsoft's VBScript as a data source type, BarTender lets you process and combine the data for objects on a template in just about any way imaginable.
To set a data source's type to VBScript
-
Add a text, encoder, or barcode object to your template.
-
Double-click the border of the object to open that object's Properties dialog. Alternatively, select Properties from the object's context menu.
-
In the Navigation Pane, select the data source whose type you want to change.
-
Click the Data Source tab.
-
On the right of the Type field, click
to open the Change Data Source Type Wizard.
-
From the Type dropdown list, select
Visual Basic Script.
-
Click Finish to close the Change Data Source Type Wizard.
-
Select the desired Script Type.
You can enter your script directly into the text field. To use the advanced scripting functions of the Script Editor, click the Edit with Script Editor button.
To make Visual Basic Scripting accessible to more than just programmers, BarTender provides three levels of complexity for Visual Basic Script users who want to use VBScript as a data source type.
|
BarTender does not support automation for data entry controls. If you attempt to use an Object property in a data entry script (such as the OnPrePrompt or OnPostPrompt events), BarTender will return an error and your script will fail to execute.
|
In This Section
-
Single-Line Expressions
Details how to use the simplest script type, which can be constructed with little or no programming experience.
-
Multi-Line Scripts
Describes the advantages of using Multi-Line Scripts for custom control over your data and how they are used.
-
Event Control Scripts
Describes the availability of Event Control Scripts to determine when your custom scripts are executed.