Visual Basic Scripting in
|
|
The topics contained within this section refer to using Visual Basic scripts within BarTender's user interface. To automate BarTender from an external application, you will need to use BarTender's ActiveX Automation interface, or install the BarTender .NET SDKs. For more information, see Automating BarTender. |
There are basically two types of purposes for which you can use
The script output can be used as the data source type for a text
Text
To use this feature, you need to set the data source of the object to Visual Basic Script on the Data Source property page. The Edit button on that tab opens the Script Assistant, where you can create the script.
A script can be used to perform special validation or other processing on data from some other source, such as a database or the keyboard.
Sometimes your data needs to be validated or processed in an unusual way before printing. At other times, you may want another ActiveX-aware application on your system to react in some controlled way to an event in
When this is your purpose, you need to set the data source type of the object to embedded data, database field, time, or date. Then on the Transforms tab, select the icon next to VB Scripting. On the VB Scripting dialog, enable VB Scripting, and click the Edit button to open the Script Assistant, where you can create the script.
|
|
Visual Basic Script is a subset of Microsoft's Visual Basic programming language. It is specifically designed to add functionality to existing programs, rather than to write programs themselves. When used as a data source in
To make Visual Basic Scripting accessible to more than just programmers,
Single-Line Expression. This is the simplest form of a script and can be constructed with little or no programming experience.
Multi-Line Scripts. Multiple-line scripts require more advanced programming knowledge, but they provide a truly extraordinary degree of custom control over your data.
Event Control Scripts. Takes the concept of multi-line scripts and, instead of letting
Although Visual Basic Scripts can be complex enough to be considered "programs," there are times when just a single line of Visual Basic Script may prove quite useful. Simple scripts such as these can be formed using your mouse and
Related Topics