
Multiple-line scripts require more advanced programming knowledge, but they provide a truly extraordinary degree of custom control over your data.Įvent Control Scripts.

This is the simplest form of a script and can be constructed with little or no programming experience. Each of these levels is summarized below: To make Visual Basic Scripting accessible to more than just programmers, BarTender provides three levels of complexity for Visual Basic Script users. Such scripts may test for a number of conditions and then, depending on the results, perform one or perhaps many tasks. Scripts can also be so advanced that they are almost programs themselves (even though they are still used within other programs). When used as a data source in BarTender, a Visual Basic Script can be as simple as a single command or "function." For example, a single line of Visual Basic Script can be used to add or remove one or more characters from an imported data field. It is specifically designed to add functionality to existing programs, rather than to write programs themselves. Visual Basic Script is a subset of Microsoft's Visual Basic programming language. How Visual Basic Script is used in BarTender 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. On the VB Scripting dialog, enable VB Scripting, and click the Edit button to open the Script Assistant, where you can create the script.īarTender does not support automation for data entry controls. Then on the Transforms tab, select the icon next to VB Scripting. When this is your purpose, you need to set the data source type of the object to embedded data, database field, time, or date. For example, you may want BarTender to cancel print jobs that would produce more than a specified number of copies. At other times, you may want another ActiveX-aware application on your system to react in some controlled way to an event in BarTender. Sometimes your data needs to be validated or processed in an unusual way before printing. The Edit button on that tab opens the Script Assistant, where you can create the script.Ī script can be used to perform special validation or other processing on data from some other source, such as a database or the keyboard.

To use this feature, you need to set the data source of the object to Visual Basic Script on the Data Source property page. By offering the power of Microsoft's Visual Basic Script as a data source type, BarTender lets you process and combine the data for objects on a template in just about any way imaginable. For example, you may need to read data from a file, change it in some special way, and then perhaps combine it in an unusual manner with some other data. Sometimes, however, you may have special requirements. Text, encoder, and barcode objects on a template can receive their data from a number of sources, including your keyboard, data source files, and your computer's time and date functions.

The script output can be used as the data source type for a text, encoder, or barcode object. There are basically two types of purposes for which you can use BarTender's internal scripting feature: For more information, see Automating BarTender.
Bartender 10.1 vbscipt array install#
To automate BarTender from an external application, you will need to use BarTender's ActiveX Automation interface, or install the BarTender. The topics contained within this section refer to using Visual Basic scripts within BarTender's user interface. Understanding Visual Basic Scripting Visual Basic Scripting in BarTender
