Editor Pane

Use the Editor pane, which is located in the center of the Script Editor, to write your scripts in. Any custom script that you write is run when you print your document.

You can customize the appearance of your script in the Editor pane by using the View Options dialog.

There are two methods that you can use to write your scripts. You can manually enter your script into the pane, and you can insert script snippets from the BarTender code snippet library by using the Script Assistant pane to select the snippet that you want. When you double-click a snippet in the Script Assistant pane, the script is automatically inserted into the Editor pane.

An alternative to using the Script Assistant pane is to press Ctrl+J on your keyboard to open a pop-up snippet menu. Start typing the snippet name. When the matching snippets appear in the list, you can click a snippet to display an expanded pop-up of the full snippet script. When you find the snippet that you want to add to the Editor pane, double-click it, or click it and then press Enter on your keyboard.

Using the Editor Pane Toolbar

Use the editor pane toolbar, which is located above the editor pane, to customize your scripts. The following options are available:

Deletes the text and copies it to the Clipboard so that you can paste it elsewhere.

Copies the text to the Clipboard so that you can paste it elsewhere.

Pastes a copy of the text that is stored on the Clipboard into the Editor pane.

Undoes the previous action.

Redoes the previously undone action.

Indents the text.

Outdents the text.

Comments the selected line of code.

Uncomments the selected line of code.

Tests the script and then displays the results in the Output pane.

Protecting a Visual Basic Script

You can password-protect a Visual Basic script to prevent unauthorized users from editing it. You set up this process by using the BarTender Document Password dialog and then complete it in the Editor pane of the Script Editor.

ClosedTo password protect a Visual Basic script

  1. Open BarTender.

  2. Open the document that contains the script that you want to protect.

  3. On the File menu, click BarTender Document Password to open the BarTender Document Password dialog.

  4. Under New Password, enter a password.

  5. Under Confirm Password, re-enter the password.

  6. Optionally, enter a password hint.

  7. Under Protected Actions, click to select the Modify Protected VB Script(s) check box.

  8. Click OK to close the dialog.

  9. In the open BarTender document, open the script that you want to protect in the Script Editor.

  10. At the bottom of the Editor pane, click to select the Protected by Document Password check box.

  11. Click Close to close the Script Editor. The next time a user tries to open the protected script, he or she is prompted to enter the document password that you configured.

Related Topics