Script Pane

The Script pane, located on the left side of the Script Editor, defines the event or procedure that determines the occurrence of your custom script. The selected node tells you when your script will execute: for example, if you’ve clicked on a document event, then the script in the Editor pane is for that event. Each node can contain its own custom script.

If you test a custom script it fails, you will see the results displayed in the Output pane. Additionally, the Script pane will display an error icon next to the event or data source involved to help you isolate and solve the problem.

Filtering Scripts

You can customize what is displayed in the Script pane by clicking the Script pane icons:

Shows all possible events, whether or not any script has been defined yet.

Shows all events which have script defined for them.

Shows all events for the object you are currently working with. To cause an object to appear in this view, first select any item under the template object name, then click the icon.

Shows all events for the current document, at the document level. You cannot edit template objects from this view.

Contents of the Script Pane

The Script pane contains a list of all events and procedures available in BarTender, including document-level scripts and scripts for individual objects.

Permanent Events are events that appear in the Script pane constantly:

Procedures for All Events: Where you place shared functions, subroutines, and variables for reference by all events in the document. If you select Procedures for All Events, then create a script in the Editor pane, that script will apply to all events in the document. For more information, refer to Procedures.

Document Events: Individual events that affect the whole document. They are executed at the time of the event selected, and allow you to control the timing of your custom scripts. For example, a script written for the OnOpen document event will execute when the document is opened. For more information, refer to Document Level Events.

Transitory Events and Objects are events and objects that may or may not appear in the Script pane, depending on the named data sources, template objects, and object configuration set up in your document:

Named Data Sources: Appears if you have defined one or more named data source in your document. If you create a custom script for a named data source, it will affect only that data source, and not the rest of the template.

Template Objects: Appears if you have added objects to your current template, such as text objects, encoder objects, or barcode objects.

Line and shape objects will not appear in the Script pane, as they cannot use data sources. However, you can adjust the appearance of line, shape, and picture objects with VBScript using a document-level event.

Data Sources list the data sources contained within a template object. Using this node, you can easily access transforms, procedures, and events to use with that data source.

Related Topics